Trouble with Matchmaking and Creating Rooms - PLEASE HELP

Options
I have created a system to queue up a bunch of players and assign them to a room (This is similar to a league type matchmaker). Theoretically everything works. It adds the players to my GameLobby class as GameLobbyMembers which stores their PhotonView information and other information needed. The problem I am having is with creating rooms and joining rooms.

I get these errors:
Operation failed: OperationResponse 226: ReturnCode: 32758 (Game does not exist). Parameters: {} Server: MasterServer
UnityEngine.Debug:LogError(Object)

Operation failed: OperationResponse 226: ReturnCode: 32758 (Game does not exists). Parameters: {} Server: GameServer
UnityEngine.Debug:LogError(Object)

Im not sure exactly what these mean or why I am getting these errors. Everything Ive looked up on forums and documentation seems to be doing it this way.

Another peculiar thing that is happening is that the player is being added twice when it should only be adding once. It is recalling OnJoinedLobby twice but not a third time, when there is nothing telling it to do this twice.

I hope my explaination is thorough enough, but if not I will happily provide any information along with extra pieces of code to get this problem solved. It has been keeping me up at night.

Here are some code samples of what I am doing:

Matchmaker.cs:

http://pastebin.com/z5pS9pkj


GameManager.cs:

http://pastebin.com/FZhhYhCw


GameLobby.cs:

http://pastebin.com/irg6bt0F


If you could take a look at the code I provided I would be the happiest man on earth.

THANKS

Comments

  • vadim
    Options
    You are trying to join room which is not created yet or possible has been destroyed already because of all players left the room. Create room with CreateRoom call first, or use JoinOrCreateRoom instead of JoinRoom.
  • Dev
    Options
    To my knowledge I do call create room first. When the GameLobby constructor is called so is the CreateRoom with the lobby name. Then I go through all the instances of GameLobby in the activeLobbies list and add the player from the queue to the GameLobby and JoinRoom?

    Is this what my code is actually doing? Where is it going wrong?
  • Dev
    Options
    The JoinOrCreateRoom sort of worked. It got rid of the error but the problem I am having is that it is instantiating two different rooms instead of adding the second player to the room. I believe it is something with the queue not being synchronized and just running for each client. I am fairly new to networking and it is hard for me to know the exact cause. I do believe the matchmaking code is theoretically right but I can see how it is never being used over the server. Could you please help?????
  • Tobias
    Options
    Please use our matchmaking.
    See my answer here:
    http://forum.photonengine.com/discussion/6828