MatchNotFoundMessage

A message indicating that no suitable match was found during the configured time

View interactive version here

Request Parameters

Parameter Required Type Description
matchGroup No string The group the player was assigned in the matchmaking request
matchShortCode No string The shortCode of the match type this message for
messageId No string A unique identifier for this message.
notification No boolean Flag indicating whether this message could be sent as a push notification or not.
participantData No JSON A JSON Map of any data that was associated to this user
scriptData No ScriptData[] ScriptData is arbitrary data that can be stored in a message by a Cloud Code script.
subTitle No string A textual title for the message.
summary No string A textual summary describing the message's purpose.
title No string A textual title for the message.

Nested types

ScriptData

A collection of arbitrary data that can be added to a message via a Cloud Code script.

Parameter Type Description
myKey string An arbitrary data key
myValue JSON An arbitrary data value.

Code Samples

C#

    MatchNotFoundMessage.Listener = (message) => {
    string matchGroup = message.MatchGroup;
    string matchShortCode = message.MatchShortCode;
    string messageId = message.MessageId;
    bool? notification = message.Notification;
    GSData participantData = message.ParticipantData;
    GSEnumerable<GSData> scriptData = message.ScriptData;
    string subTitle = message.SubTitle;
    string summary = message.Summary;
    string title = message.Title;
    };

ActionScript 3

    gs.getMessageHandler().setHandler(
        ".MatchNotFoundMessage",
        function (message:MatchNotFoundMessage):void {
        var matchGroup:String = message.getMatchGroup(); 
        var matchShortCode:String = message.getMatchShortCode(); 
        var messageId:String = message.getMessageId(); 
        var notification:Boolean = message.getNotification(); 
        var participantData:Object = message.getParticipantData(); 
        var scriptData:Vector.<ScriptData> = message.getScriptData(); 
        var subTitle:String = message.getSubTitle(); 
        var summary:String = message.getSummary(); 
        var title:String = message.getTitle(); 
        }
);

Objective-C

    [listener onGSMatchNotFoundMessage:^(GSMatchNotFoundMessage* message) {
    NSString* matchGroup = [message getMatchGroup]; 
    NSString* matchShortCode = [message getMatchShortCode]; 
    NSString* messageId = [message getMessageId]; 
    BOOL notification = [message getNotification]; 
    NSDictionary* participantData = [message getParticipantData]; 
    NSArray* scriptData = [message getScriptData]; 
    NSString* subTitle = [message getSubTitle]; 
    NSString* summary = [message getSummary]; 
    NSString* title = [message getTitle]; 
    }];

Java

    gs.getMessageHandler().setMatchNotFoundMessageListener(
        new GSEventConsumer<MatchNotFoundMessage>() {
            public void onEvent(MatchNotFoundMessage message) {
        String matchGroup = message.getMatchGroup(); 
        String matchShortCode = message.getMatchShortCode(); 
        String messageId = message.getMessageId(); 
        Boolean notification = message.getNotification(); 
        GSData participantData = message.getParticipantData(); 
        String subTitle = message.getSubTitle(); 
        String summary = message.getSummary(); 
        String title = message.getTitle(); 
            }
        }
    );

C++

    using namespace GameSparks::Core;
    using namespace GameSparks::Api::Messages;
    ...
    void OnMatchNotFoundMessage(GS& gsInstance, const MatchNotFoundMessage& message)
    {
    gsstl::string matchGroup = message.getMatchGroup(); 
    gsstl::string matchShortCode = message.getMatchShortCode(); 
    gsstl::string messageId = message.getMessageId(); 
    Optional::t_BoolOptional notification = message.getNotification(); 
    GSData participantData = message.getParticipantData(); 
    gsstl:vector<GSData> scriptData = message.getScriptData(); 
    gsstl::string subTitle = message.getSubTitle(); 
    gsstl::string summary = message.getSummary(); 
    gsstl::string title = message.getTitle(); 
    }
    ...
    GS.SetMessageListener(OnMatchNotFoundMessage);
Did this page help you? Please enter your feedback below.