Hello,
I tried to use com.playfab.player_created rule to call a CloudScript function that creates an internal variable automatically for any player created. But it didn't work.
Here is the code:
handlers.Hello = function(args, context){ server.UpdateUserInternalData({ X_SecretKey: SECRET_KEY, PlayFabId, currentPlayerId, Data: {"kname": "0"} }); }
I figured it could be because of
currentPlayerId
Is not defined? And if so, how can I send it as an argument in the rule?
Replacing the Execute CloudScript with Grant Item works. So the event fires, but the function does nothing.
I am trying to avoid making the player initiate this event manually (i.e. calling ExecuteCloudScript from client)
Thank you.