Jump to content

Recommended Posts

Posted

It is not working. Using the following:

Script.leaderboard = nil
Script.leaderboardName = "testtest3"
Script.type = Leaderboard.Time
Script.order = Leaderboard.Descending
storedavatars={}

function Script:Start()
System:Print("Name: "..self.leaderboardName .." --- type: "..self.type .. " --- Order: "..self.order)
self:SetScore()
end

function Script:SetScore()
if self.leaderboard==nil then
self.leaderboard = Steamworks:GetLeaderboard(self.leaderboardName, self.type, self.order)
end

if self.leaderboard==nil then
return false
end

result=self.leaderboard:SetScore(51.0234235)
result=self.leaderboard:SetScore(81.0234234)
self.leaderboard:Release()
self.leaderboard = nil

return result
end

 

Results in: highest score: 81. looks like we can only store whole numbers.

 

Perhaps the sort ordering determines how the entire list is returned rather than setting the lowest time as the best score. Just test it with the 'highscore' leaderboard. The sort ordering doesn't determine the order in which entries are returned.

Posted

Well, one quick hack would be to make the score negative, which will flip the order.

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...