question

vuks89 avatar image
vuks89 asked

Server GetLeaderboard returns outdated stats

When I call GetLeaderboard method with

ProfileConstraints: {
                
ShowDisplayName: true,
ShowLinkedAccounts: true,
-> ShowStatistics: true
}

I get Statistics field, but it contains outdated information. For example I have a statistics that is reset every day, and I have yesterdays scores in the response.

Is there something I missed or is this by design?

Leaderboards and Statistics
1 comment
10 |1200

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

vuks89 avatar image vuks89 commented ·

Additionally. Is there a way to get a position of a player on multiple leaderboards at one time?

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

It's by design, but I can see where it could be confusing. The profile data returned contains both the current statistic for the player (if they have a reported score on the current leaderboard), plus one previous one. So in your game, you'd see the player's score from yesterday and today.

Right now, you can get the version numbers for your leaderboards via https://api.playfab.com/documentation/client/method/GetPlayerStatisticVersions. I'll also file a bug to get that added to the data you get back from the profile as well, to help make sure that's clear.

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.