I can't leave room by clicking leave room button and it says operation leaveroom(254) not allowed
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
I can't leave room by clicking leave room button and it says operation leaveroom(254) not allowed
PhyoHtet123_
2021-12-27 18:04:44
Second Question is
1 connected to photon using setting
2 on connected to master->photonNetwork.joinLobby()
3On JoinLobby->Load Scene from login to lobbyScene(created by myself)
3 while in lobbyScene if the player click Play button I called the following methods
4 If(photonNetwork.isconnected)=>photonNetwork.JoinorCreateRoom("ClassicRoom",maxplayer)
Are above steps corrects and synchonous?
Do I really need to join Lobby first or what is the problem if I called joinorCreateRoom directly on connected to master?
What is the difference?
\
Comments
Hi @PhyoHtet123_,
Are above steps corrects and synchonous?
Steps look correct but not sure what "synchronous" mean exactly but you need to wait for callbacks always as each operation (method) is Asynchronous and expects a server response or event or even server switch to trigger a callback.
Do I really need to join Lobby first or what is the problem if I called joinorCreateRoom directly on connected to master?
What is the difference?
You don't need to join any lobby unless you need to get the list of rooms available in lobbies of default type.
Read more here.
I can't leave room by clicking leave room button and it says operation leaveroom(254) not allowed
We need the full exact error message but in general you can only call LeaveRoom only while joined to one. And once you call it you don't need to do it again (e.g. clicking a button multiple times may cause this).
In general I invite you to finish PUN Basics Tutorial OR finish a good YouTube series about PUN 2.
Also if you are just starting a new project, we highly recommend starting with Photon Fusion which is replacing PUN and Photon Bolt.
PhyoHtet123_
2021-12-29 13:17:22
Thanks you so much for your reply.It is helpful
Back to top