game-common / pragma.gameinstance / GameInstanceApi / addPlayers /

addPlayers #

suspend fun addPlayers(gameInstanceId: <ERROR CLASS>, requestExt: ExtBackendAddPlayersRequest, playersToAdd: Map<<ERROR CLASS>, ExtBackendAddPlayer>): PragmaResult<Unit, PragmaFailure>

Request to add players to a GameInstance. Triggers the GameInstancePlugin.handleBackendAddPlayersRequest plugin method.

Parameters #

gameInstanceId

The id of the game instance to add the players to.

requestExt

The data to be sent along with the request.

playersToAdd

A map of player ids to ext data for each player to add to the game instance.

Throws #

pragma.PragmaError.GameInstanceService_UnknownGameInstanceId

if a game instance is not found for the provided game instance id.