Hi,
Somehow all numbers in objects passed into entity.SetObjects are converted to booleans - when i return the state of the objects as payload they all have the desired structure with integers - but when checking the object content on developer.playfab.com all numbers are replaced with booleans.
I don't have a Javascript background so my first thoughts was it must have to do something with it's auto conversion and i tried to force the numbers with new Number() - but as the payload object is perfectly fine my assumption is that the object is converted internally by SetObjects.
var groupObjects = entity.GetObjects({Entity: groupEntityKey}); var groupStats = {}; if(groupObjects.Objects.hasOwnProperty("Stats")){ if(groupObjects.Objects.Cartels.hasOwnProperty("DataObject")){ groupStats = cityObjects.Objects.Stats.DataObject; groupStats.push({Stat: args.Stat, Slot: groupStats.length}); } else{ groupStats= [{Stat: args.Stat, Slot: new Number(0)}]; } } else{ groupStats= [{Stat: args.Stat, Slot: new Number(0)}]; } var setObjectsResponse = entity.SetObjects({Entity: groupEntityKey, Objects: [{DataObject: groupStats, DeleteObject: false, ObjectName: "Stats"}]}); return { result: 1, errorCode: -1, payload: groupStats};
Is there a way to deal with this behaviour?