I created an event to start matches, but for some reason the SparkMultiplayer function CreateMatch / CreateMatchById always return null instead of a match ID. Also there is no object stored in the matchInstance or pendingMatch collections.
According to this thread https://support.gamesparks.net/support/discussions/topics/1000084249
I should find something in the matchInstance collection
The playerid i use is definitely valid, but i get no error whatsoever
var player = Spark.getPlayer(); //var players = Spark.find("player", {}) var players = [player.getPlayerId()]; var match_id = Spark.getMultiplayer().createMatchById(players); Spark.setScriptData("gameID", match_id); Spark.setScriptData("player1", players[0]);
Also if i use the find function I get no results for some reason.
The returned field gameID is always null and the field player1 returns my valid playeriD
Hendrik Hollenborg
I created an event to start matches, but for some reason the SparkMultiplayer function CreateMatch / CreateMatchById always return null instead of a match ID. Also there is no object stored in the matchInstance or pendingMatch collections.
According to this thread https://support.gamesparks.net/support/discussions/topics/1000084249
I should find something in the matchInstance collection
The playerid i use is definitely valid, but i get no error whatsoever
Also if i use the find function I get no results for some reason.
The returned field gameID is always null and the field player1 returns my valid playeriD