Hello,
I'm trying to setup an automated daily reset on all players for either Player Statistics or Player Data (Title) but can't seem to get it working correctly.
Do you have any suggestions on the best way to do this?
I've tried using Automation to create a daily cloud script call to reset a specific player statistic but when attempting to run it from the browser it throws an error stating there is no current player.
The idea is to reset WalkingRewards to 0 every single day.
Here's the cloud script code:
handlers.WalkRewards_Reset = function(args, context) { var request = { PlayFabId: currentPlayerId, Statistics: [{ StatisticName: "WalkingRewards", Value: 0 }] }; var playerStatResult = server.UpdatePlayerStatistics(request); }
Any idea what is going wrong here?
Thanks!