Hello everyone,
I am trying to add default data for every new players. I created a rule (player_added_title) and set its cloudscript function "NewUserAdded". It looks like the function is called but it gives me error.
- I want to add some private both read only and internal data to every new players. What is wrong in the code?
- Also, where can I see the error this code is throwing?
Here is the code:
handlers.NewUserAdded = function (args, context) { var addReadonlyDataRequest = { "PlayfabId": id, "Data": { "NextRace" : "Now", "NextBuyPart" : "Now", "NextBuyCar" : "Now" }, "Permission": "Private" }; server.UpdateUserReadOnlyData(addReadonlyDataRequest); var addInternalDataRequest = { "PlayfabId": id, "Data": { "IsFirstRace" : "0" }, "Permission": "Private" }; server.UpdateUserInternalData(addInternalDataRequest); }