Sign In Register

How can we help you today?

Start a new topic

How to find ongoing matches on cloud code ?

Is there a way to find the ongoing matches from cloud code or should i create a cloud code for saving matchId's to a runtime collection and deleting them from collection when the match ends ?

So, while looking into the system collections i've found the matchInstance collection and by searching the forum a little i've found that this is not recommended to read data from that collection. Which means my options are creating a runtime collection to store the matchID's or use SparkCache to store the matchID's. Both of them seems reasonable but my problem is how can i delete the completed matches ID's from either SparkCache or runtimecollection ?

Also while trying to send a MatchMakingRequest via an event on cloud code i get an {"matchId":"REQUIRED"} error on unity while it works correctly on test harness.  

    var request = new SparkRequests.MatchmakingRequest();
    request.matchShortCode = "Standart_Match";
    request.skill = "0";


Hi Kaan,

What is the original event that you are calling this SparkRequest from in Cloud Code ? The MatchmakingRequest doesn't have a matchId field so it must be your custom event that is expecting it here.



Thanks for the reply Liam.

this event is LGN_SRVR

and i'm calling it from unity with the code 

	public void GameEnter()
		new LogEventRequest ()
			.SetEventKey ("LGN_SRVR")
			.Send ((response) => {


i'm calling this method after authenticating the client and after calling the method the response i got is this.

My custom LGN_SRVR event is the exact thing i wrote in code snippets before your reply.

Login to post a comment