Question from a developer:
I'm using Cloud Script, and I'm trying to write a value to a Key that is named dynamically, but it's not working. Using the code below, my Key is coming back as being "currentPlayerId" rather than the PlayFab ID of the actual user. How can I do this correctly?
handlers.messageToPlayer = function (args) {
var messageGroupId = args.toPlayerId + "_messages";
server.UpdateSharedGroupData(
{
"SharedGroupId": messageGroupId, "Data" :
{
currentPlayerId : args.messageText
}
}
);
}