Hi everyone!
I recently got my hands on PlayFab in order to use it in my Unreal Engine project. Unfortunately, I ran into a problem when working with Cloud Script - Revisions(Legacy) and I can't figure it out.
In particular, it is about updating/creating player data.
If I decide to use PlayFab's plugin for Unreal Engine and its UpdateUserData function, I am able to insert a JSON object in Key:Value format (for example "Games" : "5") and everything works fine.
The player will create this pair within his Player Data (Title) where the number of games will be stored.
However, the problem appears when I want to define this function directly in Cloud Script (Revisions). I have created a function that has 2 parameters - KeyName and ValueName (to create a Key:Value pair). These 2 parameters are then stored in 2 variables - var Key and var Value. In this function, I further use UpdateUserData, where I try to enter these two values (Key and Value variables) - however, if I do this, only Value variable takes the actual value that the user enters as an argument and Key part (within Data) ignores the user's input and uses only the variable name itself (or whatever is entered there) and not what is stored in it.
I would also like to add, that both of these variables actually have the correct value from user/caller when I use the logging to verify it, but the Data part simple doesn't take the Key one.
It is little bit complicated to explain in plain text, so I will attach some screenshots to demonstrate it.
I can attach only 2 screenshots, so the rest can be found here - https://imgur.com/a/nJGf534