I know that there is something wrong in my code. Is hard to find cloudscript examples out there. I know that custom data is a dictionary . I am not a fan of javascript. Here is my cloudscript.
handlers.UpgradeCosmetic = function(args,context) { server.SubtractUserVirtualCurrency({PlayFabId: currentPlayerId, VirtualCurrency: "RB", Amount: args.bananaCost}); var dataPayload = {}; var currentVersion = args.currentVersion+1; dataPayload["currentVersion"] = currentVersion.toString();
server.UpdateUserInventoryItemCustomData
({
PlayFabId : currentPlayerId,
ItemInstanceId : args.itemId,
Data : dataPayload
});
} This what I get on the playstream. I need to know what I am missing in the formatting probably.