Hey in sample code we update and get statistic in same call.
Problem is that returned values are old, not updated values.
Is this bug?
handlers.gameCompletedEvent = function(args) { var score = args["score"]; var _resp = server.UpdatePlayerStatistics({ "PlayFabId" : currentPlayerId, "Statistics" : [ { "StatisticName": "Local", //This is actually weekly statisticcs "Value": score }, { "StatisticName": "All", "Value": score } ] }); var _leaderboardPositionUser = server.GetLeaderboardAroundUser({ "PlayFabId" : currentPlayerId, "StatisticName" : "All", // Weekly "MaxResultsCount" : 1 }); return { "UserPosition" : _leaderboardPositionUser.Leaderboard //, //"Alltime" : _leaderboardAroundUser_Alltime.Leaderboard }; },
Hey in sample code we update and get statistic in same call.
Problem is that returned values are old, not updated values.
Is this bug?
handlers.gameCompletedEvent = function(args) { var score = args["score"]; var _resp = server.UpdatePlayerStatistics({ "PlayFabId" : currentPlayerId, "Statistics" : [ { "StatisticName": "Local", //This is actually weekly statisticcs "Value": score }, { "StatisticName": "All", "Value": score } ] }); var _leaderboardPositionUser = server.GetLeaderboardAroundUser({ "PlayFabId" : currentPlayerId, "StatisticName" : "All", // Weekly "MaxResultsCount" : 1 }); return { "UserPosition" : _leaderboardPositionUser.Leaderboard //, //"Alltime" : _leaderboardAroundUser_Alltime.Leaderboard }; }