Sign In Register

How can we help you today?

Start a new topic

Get matchData in event scripts

Please, say Me. How get Match Data in event scripts? I did is like this:

var matchID = Spark.getData().mid;

var participantsData = Spark.getData().pdata;

var matchDetails = Spark.getMultiplayer().loadMatch(matchID);

 I send RTSession.getSessionId() from Real Time Script to matchID this event script. But this does not always work. Please, healp me( 

1 Comment

Hi Vitaly,

Are you trying to send this from a real time script ? If so you'll need to send a LogEventRequest from it to do this. In Cloud Code the above will work if you pass in a valid matchID through the mid attribute.

//get the match data
var matchData = matchDetails.getMatchData()




Login to post a comment