New problem for me - Game Closed


I have another problem with Photon. When I am trying to connect to existing room (second instance of my game), it cant join with this error:

joinGame failed, client stays on masterserver: OperationResponse 226: ReturnCode: 32764 (Game closed). Parameters: {}. State: JoinedLobby
PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Plugins/PhotonNetwork/PhotonHandler.cs:104)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Plugins/PhotonNetwork/NetworkingPeer.cs:782)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Plugins/PhotonNetwork/NetworkingPeer.cs:922)
PhotonHandler:Update() (at Assets/Plugins/PhotonNetwork/PhotonHandler.cs:58)

Weird is that when I ran it first time today, it was running fine, joining the room. When I ran it for second time it gives me this error. Any ideas? Thank you guys.


  • Ok, I think I found a solution for this one. For no parrent reason when I created a game with PhotonNetwork.CreateRoom ("game", true, true,10); then all parameters were anyway set to false, false, 0 - so i could not connect with other client. So I just added few lines after creating a game that sets everything as it should be: = true;
    PhotonNetwork.Room.visible = true;
    PhotonNetwork.Room.max = 10;
  • Tobias
    Needless to say, this should work. I just tried again with PUN v1.3 (no modifications) and on the cloud and it worked for me.
    The room you try to join is listed when you connect to the master, right?
    Anything you do especially different than the worker demo?
  • The Room was not returned by GetRoomList(); It was somehow closed, but i was in the room with the instance that created it (but could not join with other instances). When I wrote (using GUI.Label in Unity) the Room statistics (count of players, name, visibility etc.) I saw where the problem is. Visibility and Open was set to false and max player count to 0. This did not happen all the tries i ran the game, usually the first try worked like a charm and when I tried it again I got this error. I am using just those functions in the Viking Demo (ConnectUsingSettings, then CreateRoom (or JoinRoom)). Im not sure why this was happening, Im just glad that setting all the options manually solved the problem.

    Although I have other kind of a problem. Now when its working I am trying to connect more players to one room in Cloud. But sometimes it creates new room instead of joining the existing one which is weird because the room has the same name as the one already created by the first instance of the game. Sometimes it just takes several tryies before I succesfully join more clients to one room. (Sometimes it does not connect to cloud at all). All games (instances) are of course using the same cloud ID from the page. But this might be some problem with my code (would be strange though), I am still at the start of everything with Photon.
  • Tobias
    Can you please try if you have the same issues when you use our Viking Demo (without your modifications)?

    If so, let me please know the time (and your timezone) when you tried. Let me know which email address you used when you registered for the cloud app id (do not post the ID here).