I have the error CreateRoom failed. Client is on MasterServer (must be Master Server for matchmaking

I get this error every time I try to create or join rooms

here is my code :

using System.Collections;

using System.Collections.Generic;

using UnityEngine.UI;

using UnityEngine;

using Photon.Pun;


public class CreateAndJoinRooms : MonoBehaviourPunCallbacks

{

  public InputField createInput;

  public InputField joinInput;


  public void CreateRoom()

  {

    PhotonNetwork.CreateRoom(createInput.text);

  }


  public void JoinRoom()

  {

    PhotonNetwork.JoinRoom(joinInput.text);

  }



  public void OnJoinedRoom()

  {

    PhotonNetwork.LoadLevel("Online_Test");

  }

}

I should also mention I am using to unity game engine thanks in advance

Answers

  • If you don't use the latest PUN 2 version, please update.

    My guess is you are calling the methods more than once. Then we log an error and skip the method call.

    Add Debug.Log to your methods and make sure they only get called once and only if the client "arrived" on the Master Server.