error when i want to join again to a room

Options
i test it with above 3 ways but get error

1- load other unity Scene and goto my first Scene and go to room again ( without any photonNetwork left room code or ... )
and get this error
JoinOrCreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.

2- left room withPhotonNetwork.LeaveRoom(true); or PhotonNetwork.LeaveRoom(false); also go to my main Scene and go to my room again
and get this error
JoinOrCreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.

3- left room like upper and dissconnect using PhotonNetwork.Disconnect(); and when i want to came back to the room use connection PhotonNetwork.ConnectUsingSettings("0.1"); and one time add this PhotonNetwork.JoinLobby();
and finaly get this error
ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: Connecting
but never finish the connect progress

Comments

  • Ehsan_wwe
    Options
    is there anyone to helping me
  • Tobias
    Options
    Read the logs, please!
    Wait for callback: OnJoinedLobby or OnConnectedToMaster.

    You need to leave a room, to get back to the Master Server, so you can join/create another. This takes a few seconds at most and there is a callback when done (see above).
    Don't disconnect, too. This gets the client offline and of course this means it can not join another room.

    Read and code-along the tutorial.

  • Ehsan_wwe
    Ehsan_wwe
    edited August 2020
    Options
    thanx tobias
    but i test it
    i leave room without disconnecting
    after 10 second i join to other room but get second error ( number 2 of my first post)
    how long i should wait for OnJoinedLobby or OnConnectedToMaster
  • Ehsan_wwe
    Options
    i didn't any wrong
    i found whats the bug
    the SelfHosted mode of my PUN version have this bug
    because when i test it in Cloud mode there isn't error