I have one specific statistic in my game that is having this issue.
The only code that updates it is an Azure Function, that increments the value by 1.
int playerCareerRacesWon = playerStatisticsResult.Result.Statistics.First(s => s.StatisticName == "CareerRacesWon").Value; playerCareerRacesWon++; statisticUpdates.Add(new StatisticUpdate {StatisticName = "CareerRacesWon", Value = playerCareerRacesWon});
In this specific instance, I was logging the value of playerCareerRacesWon, and the value of playerCareerRacesWon++ after that. The logging was correct, showing the following values...
see attached (ggru5.png)
I then call a new UpdateStatisticsRequest using the Server API from the Azure Function.
The value is still 16384, and then this code is called to update them,..
var updatePlayerStatisticsRequest = new UpdatePlayerStatisticsRequest { PlayFabId = playFabId, Statistics = statisticUpdates };
But in PlayStream, the following value was logged...
see attached (bpnot.png)
Why on earth is this statistic updating erratically like this? It seems to increment by 1 for a few races, then suddenly it starts doubling in size?
I don't seem to have this issue with any of my other statistics.
My TitleID : 67909