Help with Creating named lobbys Via level number

Hello,

I need your guys help because im struggling to think of a solution.

Depending on the players level that is the name of the created room. So for example the room name would be “1” or “2”. This makes it easier for me to connect the player with the same level, into the correct room.

The issue I am having is the fact when one room is created and full, if another player is the same level and tries to create a new room it won’t allow it as there is already a room with that name.

Now i need a solution where it is easy enough to take the players level and then connect them to the room automatically with all the same level’d players.

Hope this make sense i would appreciate any help

You need to have multiple rooms for a certain level. So when first trying to join a room, store the room name in a local variable. Room name can be something like this: Level_X_Y whereat X is the current level of the player and Y is an incremented room number starting at 0. So the first player tries to join the room ‘Level_1_0’.

Next step is that you implement the OnPhotonJoinRoomFailed(…) callback (see this link) where you increment the room number and try to join another room. So when the player failed to join room ‘Level_1_0’, he tries to join room ‘Level_1_1’ and so on.