When I execute cloud script, an error occurred.
Screenshot about an error is below.
Some cloud scripts succeed, some scripts failed.
When I execute cloud script, an error occurred.
Screenshot about an error is below.
Some cloud scripts succeed, some scripts failed.
Can you please provide the details of the handler you're calling?
Ok.
This is the handler function.
handlers.forceToSetGold = function(args) { var currentGold = parseInt(args.data["CurrentGold"]); var updateUserData = {}; updateUserData["Gold"] = currentGold; server.UpdateUserReadOnlyData({ PlayFabId: currentPlayerId, Data: updateUserData }); return true; }
Are you sure that's the handler? It's "forceToSetGold", while you're calling "rebirth". If it is, and you've just renamed it, then can you try passing CurrentGold in, since that's what this handler is trying to parse?
handlers.rebirth = function(args) { var spentSoulStone = parseInt(args.data["SpentSoulStone"]); var userReadonlyData = server.GetUserReadOnlyData({ PlayFabId: currentPlayerId, Keys: ["CumulStageRewardSoul", "ItemInfo", "StatisticsInfo"] }); var statisticsData = new UserStatistics(userReadonlyData.Data["StatisticsInfo"].Value); var userInventoryData = server.GetUserInventory({ PlayFabId: currentPlayerId }); var itemInfoData = null; if (spentSoulStone > 0) { var ownedSoulStone = userInventoryData["VirtualCurrency"]["SS"]; if (spentSoulStone > ownedSoulStone) spentSoulStone = ownedSoulStone; server.SubtractUserVirtualCurrency({ PlayFabId: currentPlayerId, VirtualCurrency: "SS", Amount: spentSoulStone }); itemInfoData = completeItemLevelUp(args, userReadonlyData); }
3 People are following this question.