I'm trying to retrieve the thresholds for a match in cloud code.
To reproduce, just create any match with the shortCode "TEST", then run the following code:
{ "_id": { "$oid": "5aba5ef3dc00a804fb5f53bf" }, "script": "MatchmakingRequest", "playerId": "5ab9000d6d5542d6fcab8fb2", "log": { "stackTrace": "\tat request/MatchmakingRequest.js:32\n", "error": "Access to Java class \"java.util.ArrayList\" is prohibited. (request/MatchmakingRequest.js#32)", "script": "MatchmakingRequest" }, "level": "FATAL", "ts": { "$date": { "$numberLong": "1522163443998" } } }
var matchConfigs = Spark.getMultiplayer().getMatchConfig("TEST"); var thresholds = matchConfigs.getThresholds();
This results in a Java exception:
Hi Ted,
We are aware of this and it has been logged. For now I'd recommend saving the match config to a meta collection and referencing it from there if you need these values in Cloud Code.
Regards,
Liam
Ted Cassirer
I'm trying to retrieve the thresholds for a match in cloud code.
To reproduce, just create any match with the shortCode "TEST", then run the following code:
This results in a Java exception: