Rejoining Room issues

Hi there,

Yes I back, and I m fine now I dont think that my problem if related to my tiredness this time :p. So the project is growing up very fast thx to the PUN & the Photon cloud, but my beta testers reported me a lot of bug issues concerning multiple disconnections that I was handling as making them go back to the main menu of the game. But with this large number of reports, I had to think about a way for giving the possibility for the players to try to reconnect in Game without dropping back to the beggining, and As I started developping this reconnection system I faced a strange error; what I m doing is that when a player gers the OnDisconnected Event, he keeps trying to reconnect till OnConnectedToPhoton event is called and only then I use PhotonNetwork.Join( the stored room name) but here is what I get :
joinGame failed, client stays on masterserver: OperationResponse 226: ReturnCode: -3 (Not authorized). Parameters: {}. State: Connected

Any clarifications please ?


  • This has been solved !
    Thx for the exitgames support :
    OnConnectedToPhoton is called when the connection is established at all. The client still has to send the authorize operation to let the server know which game it is.
    You want to wait for OnJoinedLobby.
    As your client knows the game to reconnect to, your client doesn't have to get into the lobby on the master. You can disable this step (PhotonNetwork.autoJoinLobby = false) and react in OnConnectedToMaster(). Turn on the lobby joining again next time.
  • You're welcome.
    Thanks for cross posting the mail, too :)
  • I am having an "almost the same" problem...

    When I try to CREATE a room, I get this error.
    createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: -3 (Not authorized). Parameters: {}.

    Not authorized? No parameters?
    I tried it with and without custom details but still the same...

    So how do I create a room then?
    string roomname = AccountDetails.PlayerName + "'s " + ((MaxConnections == 2) ? "one-on-one" : (MaxConnections+"-way")) + " match";
    PhotonNetwork.CreateRoom(roomname, true, true, MaxConnections);