Operation SetProperties (252) not allowed on current server (MasterServer) on Demo

Hi,

I tried to follow the PUN basics tutorial on the documentation pages.

Everything works correctly until chapter 4.

If I type a user nickname, join a random room, then exit the room, and modify the nickname, the title error is raised on the console. I tough I configured something wrong, so I tried one of the demo projects. However, the same error is raised on the same process:
Operation SetProperties (252) not allowed on current server (MasterServer)
UnityEngine.Debug:LogError(Object)
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2297)
Photon.Realtime.LoadBalancingClient:CheckIfOpCanBeSent(Byte, ServerConnection, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2225)
Photon.Realtime.LoadBalancingClient:OpSetPropertiesOfActor(Int32, Hashtable, Hashtable, WebFlags) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1800)
Photon.Realtime.Player:SetPlayerNameProperty() (at Assets/Photon/PhotonRealtime/Code/Player.cs:440)
Photon.Realtime.Player:set_NickName(String) (at Assets/Photon/PhotonRealtime/Code/Player.cs:89)
Photon.Realtime.LoadBalancingClient:set_NickName(String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:545)
Photon.Pun.PhotonNetwork:set_NickName(String) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:349)
Photon.Pun.Demo.PunBasics.PlayerNameInputField:SetPlayerName(String) (at Assets/Photon/PhotonUnityNetworking/Demos/PunBasics-Tutorial/Scripts/PlayerNameInputField.cs:67)
UnityEngine.EventSystems.EventSystem:Update() (at C:/Dev/Tools/Unity Hub/versions/2019.3.7f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

Looks like this line is causing the error:
PhotonNetwork.NickName = value;

Is this expected behaviour, or am I missing something?

Best Answers

  • Wikiti
    Wikiti
    edited April 2020 Accepted Answer
    Hi @JohnTube ,

    It's working perfectly after that change.

    Thank you so much!

Answers

  • Wikiti
    Wikiti
    edited April 2020 Accepted Answer
    Hi @JohnTube ,

    It's working perfectly after that change.

    Thank you so much!
  • Hi,
    I got the error on line 407 in player.cs also.
    I changed
    else
    
    to
    else if (this.RoomReference.LoadBalancingClient.InRoom)
    

    This works for me to get rid of the error. It seems at some point I call SetPlayerProperties when I´m not in a room and that throws the error. Changed the code should be fine or does it cause any issues?
    Thanks
  • Hey @Wikiti, @rlonau,

    Just to confirm, you guys use LeaveRoom and not Disconnect to quit rooms right?
  • Wikiti
    Wikiti
    edited April 2020
    Hey @JohnTube ,

    Yes, I'm using
    PhotonNetwork.LeaveRoom()
    

    to disconnect from the current room.
  • Hey @JohnTube,
    I can also comfirm to use LeaveRoom when that error occured.