Problem with joining/creating room.

Options
waxx
waxx
Hey guys. A lot of the times I seem to get the following error upon joining lobby:
JoinRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.
Similarly CreateRoom fails too.

The thing is though I wouldn't even be able to use JoinRoom if I didn't have room list (which I update by photon's callback). What's wrong here?

Here's some code:
//Awake
        if (!PhotonNetwork.connected)
        {
            PhotonNetwork.sendRate = 30;
            PhotonNetwork.sendRateOnSerialize = 30;
            PhotonNetwork.ConnectUsingSettings("1");
        }

//
    void OnReceivedRoomListUpdate()
    {
        roomsList = PhotonNetwork.GetRoomList();
        roomsCount = roomsList.Length;
    }

//
PhotonNetwork.JoinRoom(roomsList[option-1].name);

What am I doing wrong here?

Comments

  • Tobias
    Options
    You could check if you trigger the join call multiple times instead of just once.
    Find where the log is written and add the PhotonNetwork.connectionStateDetailed as output to check which state you are in.