I am getting an error when trying to join a random room

Ok so I have a setup right now that connects to master and the servers automatically. If you have already entered your username it will automatically go to a loading screen for x amount of seconds. Once it is finished doing its setup it will then go to a main menu where I have some prototype buttons setup to go to a random room and if it isnt available it is suppose to create one. This is the error I get when I click the button:

JoinRandomRoom failed. Client is on MasterServer (must be Master Server for matchmaking) but not ready for operations (State: PeerCreated). Wait for callback: OnJoinedLobby or OnConnectedToMaster.

My Photon Code
https://pastebin.pl/view/9c857c03

Answers

  • JPGOrdon
    JPGOrdon
    edited October 2020
    I have gotten the same error before when I attempt to connect to my server on the port that the game server uses. Use port 5055 to connect when you invoke 'ConnectToMaster'. Check out the documentation for the default ports. I assume you are using the load balancing server setup that are both hosted on the same machine.