question

[not provided] avatar image
[not provided] asked

AS3 GetFriendLeaderboard returns an empty array

I'm using AS3 SDK, when I try to get the friend leaderboard according to certain StatisticName I always get an empty response: {"Leaderboard":[]}. This also happens with GetLeaderboard() and GetLeaderboardAroundCurrentUser()

10 |1200

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

brendan avatar image
brendan answered

What's the name of the statistic you're testing? Also, what results do you get for this call if you make it directly (in Postman or a similar tool)?

10 |1200

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

[not provided] avatar image
[not provided] answered

The statistics name is "score2".

It works perfectly when using postman.

I also noticed that in my dashboard I can't see the user that I have created yesterday despite the fact that this user has logged in at least once.

10 |1200

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

brendan avatar image
brendan answered

The users do take up to 20 minutes to appear in the Players tab, as stated above the player list - this is because the list itself is coming from a distinct Redshift query which does lag behind. However, you can query for any player immediately after they have created their account in your title by Username, email address, PlayFab ID, or Display Name.

I'm not seeing any issues with the leaderboard call in the SDK - if the player is currently signed in, it should work fine. Can you send a repro sample of your test case to devrel@playfab.com?

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.