Hey,
I am not sure if this is a bug or not but, I am making a request to execute a cloudscript to gift an item to a player , but the request is happening 14 times , but I have only made the request once , I check the code and check it again , is there a way to add a validator to the script .
Answer by Brendan · Jul 11, 2017 at 08:47 AM
A script will only execute once from a call to ExecuteCloudScript, so it sounds like you have a PlayStream action set to trigger the script, which may be getting triggered by something you're doing in the script itself. What is the Title ID and the Cloud Script handler in question?
Hey @Brendan,
The Title ID is E5C and I am calling the cloud script via unity by calling ExecuteCloudScriptRequest and passing the function 'RewardGachaPrize'.
As far as i know , the only way the cloudscript is called is via the code from the client
I'm not seeing that in any of the accounts I check. Can you also provide a PlayFab ID for a player account that ran into this issue?
The Title ID is E5C and I am calling the cloud script via unity by calling ExecuteCloudScriptRequest and passing the function 'RewardGachaPrize'.
As far as i know , the only way the cloudscript is called is via the code from the game client
Understood, but I'm not able to find an example of that issue in any player account. Can you please provide the PlayFab ID of a player account where this issue was seen?
Hi Brendan , this user id 307E035008DC703A that had the issue , on July 10th 12:59 PM he used a coin and then my code excutes a cloudscript to grant an item to the player , but instend of 1 item he got 14 items
Let me know if you need anything more @Brendan
Looking at the details, the service only ran it once each time it was called - it's just that it was called that many times. If you're positive there's no way the client code could do that, it's likely the player just hacked the call. That's why we always recommend putting cheat checking code into your Cloud Script - the server side is the only place you can effectively prevent cheating, really. So, check min/max values, the last time something was called, etc. Right now, your RewardGachaPrize simply grants the item without taking any precautions to see if the call is legitimate.