Operation SetProperties (252) not allowed on current server (MasterServer) on Demo
Options
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:
Looks like this line is causing the error:
Is this expected behaviour, or am I missing something?
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?
0
Best Answers
-
Hi @Wikiti,
Thank you for choosing Photon!
Replace line 436 of Player.csif (this.RoomReference != null && !this.RoomReference.IsOffline)
withif (this.RoomReference != null && !this.RoomReference.IsOffline && this.RoomReference.LoadBalancingClient.InRoom)
and try again.
Sorry for the inconvenience.5
Answers
-
Hi @Wikiti,
Thank you for choosing Photon!
Replace line 436 of Player.csif (this.RoomReference != null && !this.RoomReference.IsOffline)
withif (this.RoomReference != null && !this.RoomReference.IsOffline && this.RoomReference.LoadBalancingClient.InRoom)
and try again.
Sorry for the inconvenience.5 -
Hi,
I got the error on line 407 in player.cs also.
I changedelse
toelse 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?
Thanks1