question

gambirstudio avatar image
gambirstudio asked

Random Player From Leaderboard

Hello,
Is there any way to get total player in a leadearboard?
I want to to randomly choose player from a leaderboard, and then the player id will be used to acquire user data ( level, exp, custom data, etc ) and then display that to user.

Thank You

Leaderboards 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

·
Citrus Yan avatar image
Citrus Yan answered

Hi, GetLeaderboard supports retrieving maximal 100 entries per call. You might need to write an automated process to retrieve and store all the players using GetLeaderboard API, starts from the first entry with 100 as MaxResultsCount till the end of the Leaderboard.

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]