This is sort of a compound question, mostly because I'm very new to JavaScript.
So from my C# game code (using Unity), I communicate with PlayFab through CloudScripting only. I figured having the control to do what I need and still be a single web call was ideal. I don't know if that's bad practice or not, and it definitely makes my job a bit harder (since I'll need to do more JS code). Each of my calls in game code to the CloudScript expect a return of my current currency values, future leaderboard updates, and anything else specific to each call. These are data classes I will be deserializing via JSON.
I'd like to store a timestamp in the game code that I set in each return to make sure I don't update any values to an older response. I just want to make sure everything is up to date. Is that necessary/common? I was looking for a way to get the server time back from my ExecuteCloudScript call. I heard that each Playfab call returns the time (this was maybe added after some requests) but I don't think that's the case with Cloud Script calls?
I hate to be a true novice here, but I also noticed in the docs that the server API included a GetTime call. I added
var now = server.GetTime();
into one of my Cloud Script calls but it errors out ("The best overloaded method match for 'PlayFab.LogicServer.Source.PlayFabAPI.api_request(string, string)' has some invalid arguments"). I just opened the JavaScript file in my Visual Studio Unity C# project...so I get no intellisense and don't really know what functionality is even available to me. In fact, when I get to all the string parsing I'm sure it'll be a headache.
Anyway, any guidance on this would be extremely helpful. Once I get my bearings I can figure it all out from there, but I feel like these few problems have layered into a confusing mess for me.
Thanks for the help!
-Matt