I've managed to store + retrieve data to the Player's internal data store ['LastTimeStamp']
However when I try to do a simple comparison from a value passed in via args (args.timestamp which is the DateTime.UTCNow.Ticks from Unity) it always returns false.
I print out the value of lastTimeStamp, but it appears to be of a USerDataRecord object (IE with the 'Value' etc) not sure if that would affect hte comparison?
For instance;
var lastTimestamp = 0; if(!lastTimestampData.Data.hasOwnProperty("LastUpdateTimeStamp")) { log.debug("Did not find last time stamp in internal data.", {internalData:lastTimestampData}); return { "Response":"400", "Message":"Could not get internal data." }; } else { lastTimestamp = lastTimestampData.Data.LastUpdateTimeStamp; } if(lastTimestamp != null) { log.debug("Last Time Stamp found.", { ServerLastTimeStamp:lastTimestamp, newTimeStamp:timestamp}); // FAILS HERE ALWAYS // Example of a comparison my last execution ran is: // if(63754182047230.64 > 63754174910060.11) if(lastTimestamp > timestamp) { } }