Cannot send op: 254 Not connected.
Options
hello i added voicechat to my game but now i keep getting these errors:
Cannot send op: 254 Not connected. PeerState: Connecting UnityEngine.Debug:LogError(Object) NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1620) ExitGames.Client.Photon.EnetPeer:EnqueueOperation(Dictionary`2, Byte, SendOptions, EgMessageType) ExitGames.Client.Photon.PhotonPeer:SendOperation(Byte, Dictionary`2, SendOptions) LoadBalancingPeer:OpLeaveRoom(Boolean) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/LoadbalancingPeer.cs:370) PhotonNetwork:LeaveRoom(Boolean) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2163) RoomMultiplayerMenu:LeaveRoom() (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:901) RoomMultiplayerMenu:Update() (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:222)
Failed to Instantiate prefab: zombie. Client should be in a room. Current connectionStateDetailed: ConnectingToMasterserver UnityEngine.Debug:LogError(Object) PhotonNetwork:Instantiate(String, Vector3, Quaternion, Byte, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2473) PhotonNetwork:Instantiate(String, Vector3, Quaternion, Byte) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2456) RoomMultiplayerMenu:SpawnPlayer(String) (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:487) <Restart>d__79:MoveNext() (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:368) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)when i make a room for a split second i can see my hands but then i get deleted and after 5 seconds i get kicked out of my own room, i never disconnected
0
Comments
-
This is really important because than otherwise i cannot make my game anymore-1
-
I assume you didnt read the Error you posted here and just opend a new thread?
The first says that you are still in Connection process.Cannot send op: 254 Not connected. PeerState: Connecting
The secound says your are not in a Room,so you cant call PhotonNetwork.Instantiate.Failed to Instantiate prefab: zombie. Client should be in a room. Current connectionStateDetailed: ConnectingToMasterserver
-1 -
I assume you didnt read the Error you posted here and just opend a new thread?
The first says that you are still in Connection process.Cannot send op: 254 Not connected. PeerState: Connecting
The secound says your are not in a Room,so you cant call PhotonNetwork.Instantiate.Failed to Instantiate prefab: zombie. Client should be in a room. Current connectionStateDetailed: ConnectingToMasterserver
I did made a room and it wont never connect, i start my game, i make a room and then that happens0 -
heres my settings, the bug happened when i upgraded pun voice
https://imgur.com/a/mFqZLWx0 -
-
Dude, do us a favor and start debug your stuff before posting stuff here.
Or provide good information so we can evaluate on that.
But it is impossible for anyone to help you.
And the Errors say you are not connected and not in a Room. So please check out your code.
And if you think this problem is from implementing pun voice.Try it without, so you can be sure it is because of this.
If the errors still not vanished, ask with some more information. Like what did you tried to solve, how did you debugged your stuff, show us only the relevant code, ask a concrete question.
Also read the error ! They giving you the lines where the error is thrown.RoomMultiplayerMenu:LeaveRoom() (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:901) RoomMultiplayerMenu:Update() (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:222)
I assume your super important script RoomMultiplayerMenu got some bugs.-1 -
RoomMultiplayerMenu:LeaveRoom() (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:901) RoomMultiplayerMenu:Update() (at Assets/_Scripts/important scripts/RoomMultiplayerMenu.cs:222)
I assume your super important script RoomMultiplayerMenu got some bugs.
but if i add it than it will be impossible cause remember the old post?
yeah the infecting issues, you are always a zombie which doesnt need to happen.if (teamaScore == 0) { StartCoroutine(Restart()); LeaveRoom(); }
0 -
-
Hi @Federico123,
This is not related to VoiceChat.
It looks like you are calling LeaveRoom multiple times or calling it in the wrong time (too late).
The two error logs show that when LeaveRoom is called, the LoadBalancingClient is connecting to Master Server. Connecting to Master Server happens initially or after you leave a room or after you reconnect.
By the way, migrate to PUN 2 please.0 -
Hi @Federico123,
This is not related to VoiceChat.
It looks like you are calling LeaveRoom multiple times or calling it in the wrong time (too late).
The two error logs show that when LeaveRoom is called, the LoadBalancingClient is connecting to Master Server. Connecting to Master Server happens initially or after you leave a room or after you reconnect.
By the way, migrate to PUN 2 please.
Ok, I'm updating to pun 2.0