question

Viktor Bokhan avatar image
Viktor Bokhan asked

Why Leaderboard returns players with zero value?

Hello!

My problem is when I register new player, and then when I am calling leaderboard list it returns also this player score and with zero value. But we didnt put any statistics so far for this player and at developer.playfab.com there is no actual scores for this player as well.

So why then API returns zero value for player with empty stats?

apissdks
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Hi Viktor,

Do you mean that every time you register a new player, this issue that calling leaderboard list returns also this player score and with zero value happens? May I know which API did you use to register a new player, title id of your game, and PlayFabId of the players that have this issue? We will need these info to reproduce your issue. Thanks.

10 |1200

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

joon avatar image
joon answered

I am seeing this issue or one very similar to it.

I have reset the leaderboard of "track020", it shows up as empty in the dashboard.

Then when I use the following code:

PlayFabClientAPI.GetLeaderboardAroundPlayer(new GetLeaderboardAroundPlayerRequest() {
    StatisticName = leaderboardID,
    MaxResultsCount = 10
}, result => {
    var entries = result.Leaderboard;
}, FailureCallback);

... and I debug the result, it shows me the following:

... where 266D459B67255FEC is the currently authenticated player

Title ID is 68254.

Player ID is 266D459B67255FEC

Leaderboard ID is track020


nkq8r.png (81.3 KiB)
2 comments
10 |1200

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

joon avatar image joon commented ·

sorry just realized there is an actual Leaderboard ID and it's 3094673413 (track020 is statistic name)

0 Likes 0 ·
joon avatar image joon commented ·

using latest Playfab SDK 1.22,

Unity 2021.2.3

0 Likes 0 ·

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.