question

astoresg avatar image
astoresg asked

Leaderboard not updated after UpdatePlayerStatistics

Hi,

after updating player statistics I am not seeing my leaderboard updated. Player statistics is updated correctly though. Isn't leaderboard updated automatically once statistics is updated?

publicvoidUpdateScore(int score)
{

if(FacebookAndPlayFabInfo.isLoggedOnPlayFab)
{
List<StatisticUpdate>stats=new List<StatisticUpdate>();
StatisticUpdate scoreStat=new StatisticUpdate();
scoreStat.Statistic Name=name Leaderboard;
scoreStat.Value=score;
stats.Add(scoreStat);

UpdatePlayerStatisticsRequest request=new UpdatePlayerStatisticsRequest();

request.Statistics=stats;
PlayFabClientAPI.UpdatePlayerStatistics(request,UpdatePlayerStatisticsSucessCallback,PlayFabErrorCallBack);

}
else
{
Debug.Log("Not logged in. Score cannot be updated.");
}
}

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

·
brendan avatar image
brendan answered

Can you clarify what the error message is you're seeing? If it's the one above ("Not logged in"), you do need to sign the player in using any of our Login... API calls, so that you have a valid session ticket.

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.