I cannot get GetObjects() to work with CloudScript. Admitedly, all of the Javascript I know, I know from googling to get CloudScript to work. Please let me know how I'm supposed to get these results and use them.
Before anyone suggests that I do this in client, I cannot, this is the primary point of cheating and has to be handled by CS.
var playersObjects = entity.GetObjects({Entity: titlePlayerAccount}); var planets = playersObjects["planets"].DataObject; var count = Object.entries(planets);
my object looks like this:
["planetA","planetB"]
and the error I get is:
"Error": "JavascriptException", "Message": "JavascriptException", "StackTrace": "TypeError: Cannot read property 'DataObject' of undefined\n at handlers.removeAllMemberships (A2460-main.js:126:45)\n at Object.invokeFunction (Script:116:33)"