question

Andrew Holman avatar image
Andrew Holman asked

TypeError when trying to declare a call to server.GetPlayersInSegment();

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

apisCloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

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.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.