Create room

Hi,
My first set up works fine when i run first time after i shutdown whole app and run again to try to create room again?
Photon throws an error which looks like this:
CreateRoom failed. Client is on NameServer (must be Master Server for matchmaking) and ready. Wait for callback: OnJoinedLobby or OnConnectedToMaster.

Why i getting this error, why i cant create room? What is causing problem?

Comments

  • The error tells you what's wrong: The client is not connected to the Master Server.
    When you disconnect and connect again, or leave a room, your client switches servers and you can't call CreateRoom before OnConnectedToMaster got called.
  • is PhotonNetwork.IsConnected checking am i connected to master or not?
  • Tobias
    Tobias admin
    edited June 2021
    No, IsConnected does not help here.
    The callback helps. Please use that...
  • I tried at .
    and added override method OnConnectedToMaster, it is got called.
    Now i getting an new error on GameServer???
    CreateRoom failed. Client is on GameServer (must be Master Server for matchmaking) and ready. Wait for callback: OnJoinedLobby or OnConnectedToMaster.

    Is this the same as previous?

  • Right now this is happening when i switching scene.
    I dont use LeaveRoom only LoadScene.
  • I solved out,
    The problem was a trying twice to create room but first i didnt call LeaveRoom.
  • Toast8888_
    edited October 2022

    CreateRoom failed. Client is on GameServer (must be Master Server for matchmaking) and ready. Wait for callback: OnJoinedLobby or OnConnectedToMaster.


    Can you help me slove this problem?

  • Tobias
    Tobias admin
    edited November 2022

    Can you help me slove this problem?

    Please read this thread and the error message: Client is on GameServer (must be Master Server for matchmaking). CreateRoom will always fail when your client is on a Game Server.