The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

photon networking joining room failed with same username with 2 players

biyyala
2018-07-25 05:42:56

HI,

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

[Deleted User]
2018-07-26 08:48:16

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 using PhotonNetwork.player.NickName.

Sarath
2022-09-15 20:44:26

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 )

Tobias
2022-09-16 08:39:14

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.

Sarath
2022-09-16 16:03:03

@TobiasYa thanks but I don't want to connect with user id, For me it is now connecting to same user id with different devices.

Sarath
2022-09-16 16:05:23

I don't want to connect with same user id

Tobias
2022-09-21 09:11:50

I don't understand the situation, sorry.

Sarath
2022-09-21 10:10:36

@TobiasOk sir, I have one game and in that logged in with some xxxx mobile number and also logged in with same xxxx number in another device, So while i start the game the same mobile number is connecting to the same mobile number. In my game it should not happen like that.

Tobias
2022-09-21 11:23:35

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).

Sarath
2022-09-23 12:24:52

@Tobias****ok thank you for your response.

Sarath
2022-09-23 12:28:02

But How @biyyala is not able to connect with user id.

Back to top