photon networking joining room failed with same username with 2 players
I created room "Demo" with player (username) name as "kamal".
I am trying to join the same username " kamal ".
I am unable join the room.
I am getting below following error.
Operation failed: OperationResponse 226: ReturnCode: 32746 (Join failed: UserId 'kamal' already joined the specified game (JoinMode=0).). Parameters: {} Server: GameServer
11:11 AM
Comments
-
Hi @biyyala,
the error message tells you, that two clients with the same UserId can't join the same room. You shouldn't set this one at all. It is handled internally. Instead of using the UserId, try using the NickName property. You can access it locally by usingPhotonNetwork.player.NickName
.0 -
Hi @biyyala how to set like this can you please tell me to not connect same player name with same player name (I am getting below following error.
Operation failed: OperationResponse 226: ReturnCode: 32746 (Join failed: UserId 'kamal' already joined the specified game (JoinMode=0).). Parameters: {} Server: GameServer )
0 -
Please refer to the Matchmaking Checklist for help on this.
If a client wants to get back into a game (after dropping out), use
RejoinRoom
or better:ReconnectAndRejoin
.0 -
I don't want to connect with same user id
0 -
I don't understand the situation, sorry.
-1 -
If you use JoinRandomRoom, it will automatically prevent users from joining the same room multiple times. So if any client's userID is already present in a fitting room, JoinRandomRoom will pick another room.
Overall, you might want to avoid using the same userID from multiple devices. It makes a lot of cases tricky and somewhat breaks the idea of being able to identify a user (by unique userID).
0