Sign In Register

How can we help you today?

Start a new topic
Answered

Cancelling A Global/User Message

How can i cancel a message sending on the server side? For example on MeatchNotFound Message i want to create my custom match and want to cancel this message sending. So player will send Matchmaking request but will not receive MatchNotFound message.


Best Answer

Hi Ufuk,


Yes this is also possible, In the Cloud Code for the message you want to cancel you can use "Spark.setScriptError("error", "dont show");" to stop the message from being sent. So for example with this in the NewHighScoreMessage, a new high score could be logged to a leaderboard but the user would not receive the message. I hope that helps, if you have any further questions just let me know.


Thanks,

Liam


Hi Ufuk,


You can turn these off in the message tab in the configurator, if you navigate there and click edit on the MatchNotFoundMessage you can set "Send Via Socket" and "Send As Push" to off to prevent them from being sent.



If you have any further questions just let me know.


Thanks,

Liam

is it possible to cancel it while in cloud code MeatchNotFound ? in some cases i want to cancel it.

Answer

Hi Ufuk,


Yes this is also possible, In the Cloud Code for the message you want to cancel you can use "Spark.setScriptError("error", "dont show");" to stop the message from being sent. So for example with this in the NewHighScoreMessage, a new high score could be logged to a leaderboard but the user would not receive the message. I hope that helps, if you have any further questions just let me know.


Thanks,

Liam

Login to post a comment