How to determine that the CloudScript function was called by the server and not by the client? For example, a function to increase the level of the player, I would not want the client to be able to assign levels to himself.
How to determine that the CloudScript function was called by the server and not by the client? For example, a function to increase the level of the player, I would not want the client to be able to assign levels to himself.
This doesn't make sense to me. CloudScript function is designed to be called from client. For server, there is no need to call CloudScript, you can just call the server APIs.
To give a player a new level and register it in the player's data, you need to make a request and get the current level. in practice, it happens that the server receives an incorrect result and can reset the player's level. this rarely happens and I don't know how to guarantee players that their level will not be reset and the result will be saved correctly. Maybe there is some universal recipe how to do it right?
I thought it would be nice if the server sent only the result of the current session to the playfab, and the calculations were made on the playfab side to avoid errors
In this case, you may write a local synchronous program to call the server APIs. So that you can make sure only if the previous call is successful can the next call be made. (you can put your set-user-level function in the successful callback of the get-user-current-level call.)
17 People are following this question.