Skip to main content
Version: 5.11.4

OnMatchResult

public MatchResultEventHandler OnMatchResult;

Argument

ValueTypeDescription
argsMatchResultEventArgsWhether the result compilation succeeded/failed

MatchResultEventArgs

ValueTypeDescription
ErrInfoErrorCodeError information
ReasonstringReason for error

Description

This event is called when a game inside a game room has ended.

  • This event is called from all clients when result compilation is finished in the server.
  • It is also called when the game is terminated due to reasons such as game timeout or deletion of a game room caused by all clients failing to connect to the game.

In order for an event to be called, the message sending/receiving method must be called.

Example

Backend.Match.OnMatchResult = (MatchResultEventArgs args) => {
// TODO
};

Argument cases

Result compilation successful
ErrInfo : ErrorCode.Success

Result compilation failed(when the server fails to compile results)
ErrInfo : ErrorCode.Exception
Reason : reason for result compilation failure(or FDM code return)

Failed to launch game(when not all users have connected to the game after the game room was created)
ErrInfo : Match_InGame_Timeout
Reason : Some gamers are not connected.(0)

Result compilation failed(when result values of some users are not sent to the server) ErrInfo : Exception
Reason : error: Success, status: 400, reason: {"errorCode":"BadParameterException","message":"bad headCount, Invalid headCount","statusCode":400}
When the Result Processing is set as Default modein the console This error may occur when the server fails to receive the result compilation message of all users within 15 seconds of receiving the first result compilation message from a user.
If the server is missing the game results of some users, the game is nullified.

Result compilation failed(when there is a disparity between the number of actual participants and the number of users in the result)
ErrInfo : Exception
Reason : error: Success, status: 400, reason: {"errorCode":"BadParameterException","message":"bad headCount, Invalid headCount","statusCode":400}

Result compilation failed(when the winner/loser user list in the result does not match the actual team users)
ErrInfo : Exception
Reason : error: Success, status: 400, reason: {"errorCode":"BadParameterException","message":"bad invalid team information, Invalid invalid team information","statusCode":400}

Game timeout(when the match time exceeds the limit set in the console)
ErrInfo : Match_InGame_Timeout
Reason : Timeout

When the wrong result value is sent to the server(e.g.: result value is not sent or only some of the users are included in the result value)
ErrInfo : ErrorCode.Exception
Reason : FDM: "Error FDM code"