Here is my code:
local function waitRoom(event) if event.isError then native.showAlert(event.errorCode, event.errorMessage, {"OK"}) else native.showAlert("PlayerIds", {event.playerId[1], event.playerId[2]}, {"OK"}) end end gpgs.multiplayer.realtime.showSelectPlayers({minPlayers = 1, maxPlayers = 1, listener = waitRoom} )
The red line is my problem, I don’t know if I got it correctly whenever I’m trying to generate the playerIds of the participants, it’s not showing the alert box.
I do know that the function is working since I already tried replacing the event.playerIds with event.name and it returned alert box “showSelectPlayers” right after I chose players from Google Play Dialog Box and hitting “PLAY” .
Only I don’t know how to format the array of playerIds. I am trying to add 1 player in addition to my device, total of 2 players.
PS: The google play option for