I followed the cloud script example to update player statistics, but it didn’t create statistic data for player.
var updateStatistics = server.UpdatePlayerStatistics({
PlayFabId: currentPlayerId,
Statistics: [{
"StatisticName": "xp",
"Value": 0
}, {
"StatisticName": "level",
"Value": 0
}, {
"StatisticName": "achievement",
"Value": 0
}]
});
What's wrong in my code?