I have simple function in cloud:
var levelname = args.level;
var score = args.score;
server.UpdateUserStatistics({
PlayFabId: currentPlayerId,
UserStatistics: { levelname: score } });
Why levelname isn't taken as args.level string?
I have simple function in cloud:
var levelname = args.level;
var score = args.score;
server.UpdateUserStatistics({
PlayFabId: currentPlayerId,
UserStatistics: { levelname: score } });
Why levelname isn't taken as args.level string?
In other words, the problem is that the Key is always "levelname" in this example, right? Here's a post that provides details on this, and the solution: https://community.playfab.com/hc/en-us/community/posts/205460148-Cloud-Script-how-do-I-write-data-to-a-Key-which-is-defined-dynamically
Basically I would like to have one function to update each level score - I will have multiple levels and passing level name as argument would be nice.
Level scores will be stored in player statistics.
No one has followed this question yet.