handlers.RankPlyaer = function (args, context) { var rank = context.Rank; var data = {}; data["Rank"] = String(rank); server.UpdateUserData({PlayFabId: currentPlayerId, Data: data}); return {}; }; How to access rank?
handlers.RankPlyaer = function (args, context) { var rank = context.Rank; var data = {}; data["Rank"] = String(rank); server.UpdateUserData({PlayFabId: currentPlayerId, Data: data}); return {}; }; How to access rank?
If you want to access such PlayStream event properties via the context input parameter of the CloudScript function. Please refer to https://docs.microsoft.com/en-us/gaming/playfab/features/automation/actions-rules/using-cloudscript-actions-with-playstream#the-context-input-parameter .
In your case, please modify the code as follows::
var rank = context.Rank;
edit to
var rank = context.playStreamEvent.Rank;
2 People are following this question.