Trying to write server code to append to player data. I am having trouble knowing wither the entry is null/empty or not.
Current Function Code:
var playerEntryResult = server.GetUserData (
{
PlayFabId: currentPlayerId,
Keys: ["entry_"]
});
var newValue = "";
if (playerEntryResult["entry_"] === undefined || playerEntryResult["entry_"] === null)
newValue += "test";
else
newValue += playerEntryResult["entry_"] + "," + "test";
server.UpdateUserData({
PlayFabId: currentPlayerId,
Data: {
entry_: newValue
}
});