gpgs.multiplayer.turnbased.finish()

Type Function
Return value none
Revision 2017.3060
Keywords Google Play Games Services, game network, gpgs, multiplayer, turn-based, finish
See also gpgs.multiplayer.turnbased
gpgs.multiplayer
gpgs.*

Overview

Indicates that a participant is finished with a match. Optionally sends match results to specified participants.

Syntax

gpgs.multiplayer.turnbased.finish( params )
params (required)

Table. Contains parameters for the call — see the next section for details.

Parameter Reference

The params table contains parameters for the call.

matchId (required)

String. The multiplayer match ID.

payload (optional)

String. Match data to send to other participants. This has a size limit as noted in gpgs.multiplayer.getLimits().

listener (optional)

Listener. Listener function which receives a finish event.

results (optional)

Array. Populate with result table elements as defined in the next section. The client which calls finish() is responsible for reporting the results for all appropriate participants in the match. Not every participant is required to have a result, but providing results for participants who are not in the match is an error.

Results Parameters

The results array can be populated with child tables, each containing individual participant details:

participantId (required)

String. Participant to send the result to.

result (optional)

String. The result of the match. Can be either "disagreed", "disconnect", "loss", "tie", "win", or "none". Default is "none".

placing (optional)

Number. The place/rank the participant has earned.