When I call the functions below, in succession, the server calls are successful (I can see that in my jsonResponse variables), but the GetUserInternalData function returns:
"result":{"PlayFabId":"","DataVersion":9,"Data":{}}
Data is always empty.
DataVersion increments each time I call postInternal.
If I enter myKey into the playfab admin web interface for the same user account, getInternal will return it.
Also, if I enter myKey into the web interface, if I call postInternal, myKey then disappears from the web interface, which may mean that it is deleted OR that it becomes private.
-
How do I get getInternal to work with data posted by postInternal?
function postInternal() {
data[myKey] = {
"r1" : "1",
"r2" : "2"
};
var postVar = {
PlayFabId: currentPlayerId,
Data: data
};
var result = server.UpdateUserInternalData(postVar);
...
return jsonResponse;
}
function getInternal() {
var postVar_get = {
PlayFabId: currentPlayerId,
Keys: [myKey]
};
var result = server.GetUserInternalData(postVar_get);
...
return jsonResponse;
}