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

  • TobiasTobias admin
    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?
  • TobiasTobias admin
    edited June 11
    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.
Sign In or Register to comment.