Hello everyone,
I want to list all of the users of my game so I could have an opportunity to have a one-on-one battle with someone I choose from that list.
Now, the idea I had in my mind to retrieve all of the users is to call (on the cloud) GetAllSegments() and then to get the first one (Because the first one contains all of the players), and then to retrieve that back to the client where the names would be displayed properly. Now the problem is I do not know how to get back all of the segments because when I write
//Cloud Code handlers.hello = function (args, context) { return { messageValue: server.GetAllSegments() }; } //Unity Code ExecuteCloudScriptRequest request = new ExecuteCloudScriptRequest() { FunctionName = "hello", // Arbitrary function name (must exist in your uploaded cloud.js file) FunctionParameter = new { inputValue = "YOUR NAME" }, // The parameter provided to your function GeneratePlayStreamEvent = true, // Optional - Shows this event in PlayStream }; PlayFabClientAPI.ExecuteCloudScript(request, OnCloudHelloWorld, OnErrorShared);
In the OnCloudHelloWorld function I get null for the messageValue value, so there must be a problem with that function. Can anyone help me with this? What am I doing wrong?