var tradingPlayers = server.GetPlayersInSegment({ SegmentId: segmentID, MaxBatchSize: sampleAmount });
// the id was correct and the sampleAmount was 5...
Not sure if this is a known issue.
var tradingPlayers = server.GetPlayersInSegment({ SegmentId: segmentID, MaxBatchSize: sampleAmount });
// the id was correct and the sampleAmount was 5...
Not sure if this is a known issue.
There was a known problem that segment calls always exceed the limit even if the rate of calls is actually slow. This problem has now been resolved. Could you please check it now?
Could you please provide the detailed error messages? And how many players in the segment? How you execute the relevant CloudScript function? Do you use the Actions to trigger the function, or you call the API ExecuteCloudScript? For clarification, there are some limitations of the processing time of the CloudScript functions. The maximum processing time for a CloudScript function called by the ExecuteCloudScript API is 10 seconds, and the maximum processing time for a CloudScript function called by an action trigger is 1 second. So, calling Server API GetPlayersinSegment in CloudScript function may cause timeout error.
There was 7 players in the degment, I executed this function via Cloudscript from on specific player via this url : https://developer.playfab.com/en-US/r/t/<titleID>/players/<PlayerID>/cloudscript
so it's not due to how often this is executed.
Could you please provide the relevant code snippet? We can't check the CloudScript page without the TitleID.
var tradingPlayers = server.GetPlayersInSegment({ SegmentId: "EBA5606C50A907AC", MaxBatchSize: 5 });
Title id is EC55
{ "FunctionResult": null, "Logs": [ { "Level": "Error", "Message": "PlayFab API request error", "Data": [ [ [] ], [ [ [ [] ], [ [] ] ] ], [ [] ], [ [ [ [] ], [ [] ], [ [] ], [ [] ], [ [] ], [ [] ], [ [] ], [ [] ] ] ] ] } ], "ExecutionTimeSeconds": 1.5044211, "MemoryConsumedBytes": 19656, "APIRequestsIssued": 3, "HttpRequestsIssued": 0, "Error": { "Error": "CloudScriptAPIRequestError", "Message": "The script called a PlayFab API, which returned an error. See the Error logs for details.", "StackTrace": "Error\n at Object.server_request (Script:181:24)\n at Object.server.GetPlayersInSegment (Script:539:76)\n at GetAllPlayersTrading_internal (EC55-main.js:1378:37)\n at handlers.GetAllPlayersTrading (EC55-main.js:1475:12)\n at Object.invokeFunction (Script:117:33)" } }
This Game Manager display issue should be fixed, could you please check it?
5 People are following this question.