question

Clammy McClammington avatar image
Clammy McClammington asked

Leadboard - get bottom of table.

Hi.

I don't want players with 0 scores to appear on the leaderboard. So I'm checking if their score is 0, and If so, I don't submit them to the leaderboard.

But I then want to query the very bottom of the leaderboard from the server - so I can display the bottom of the leaderboard with the players 0 score at the bottom.

But to do that, I need to get the bottom of the Leaderboard.

No I can get the leaderboard around the player (which is of no use, as the player wont exist in the leaderboard yet). And I can get the leaderboard starting from a position in the leaderboard - which isn't of any use for this scenario as I don't know how many entries are in the leaderboard in order to say "start from here".

Is there an easy way to do this? It's easy to get the top 10 entries in the leaderboard. But how do I query the bottom 10 entries?

A nasty way of doing it would be to keep polling the server, starting at entry 10, then adding 10, etc etc until it gets to the end. But there must be a better way?

Using unity - if that's any help?

apisunity3dLeaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
chris-3 avatar image
chris-3 answered

Can't you create a fake player, insert them into the leaderboard with the lowest score you want and do the get players around them.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.