When trying to save an update to our Cloud Script, I receive this error regarding the new "server.GetPlayersInSegment();" call. I'm unsure if there is something I should be doing differently when calling this function.
Again, this is not during runtime, this is just when trying to save the cloud script update.
The Error:
TypeError: Cannot read property 'server_request' of undefined at server.GetPlayersInSegment (Script Document:535:76) -> server.GetPlayersInSegment = function(request) { return __playfab_internal.server_request('/Server/GetPlayersInSegment', request); }
The call:
var allPlayersSegmentResult = server.GetPlayersInSegment({ "SegmentId" : ALL_PLAYERS_SEGMENT_ID, "MaxBatchSize" : 2000, "SecondsToLive" : 30 });
Thanks,
-Andrew
Answer by Citrus Yan · Oct 14, 2019 at 06:03 AM
Hi,
I tried to reproduce it but it worked in my title though, could you please try saving it again to see whether the issue still occurs? And if it still doesn’t work, please provide your title id for us to investigate, thanks.
GetPlayerCombinedInfoRequest no longer includes DisplayName in response 2 Answers
Request timeout 3 Answers
CloudScript Handler to get player IDs from segment often returns Internal Server Error 1 Answer
JSON Field Reformatting on Automation Save 2 Answers
Get players in segment count Via cloud script and update title data 1 Answer