OnPhotonJoinRoomFailed never gets called

Options
OnPhotonJoinRoomFailed never gets called with expected properties.

I've the following code where the Matchmaking filter the map type. If the MapA is already exist, it can join perfectly but the problem is when there is no room with such properties, it doesn't do anything. OnPhotonJoinRoomFailed() is not getting called and JoinRandomRoom() function always return true so I can never know the status of joining room.

ExitGames.Client.Photon.Hashtable customProps = new ExitGames.Client.Photon.Hashtable();
customProps["Map"] = MapType.MapA;

if (PhotonNetwork.JoinRandomRoom(customProps, 0))
ConnectionBox.Create("ID_PleaseWait", "ID_ConnectingServer");
else
print("Can't join room");

Comments

  • Tobias
    Options
    JoinRandomRoom's return value tells you if the operation can be send to the server. It will take a roundtrip to get the actual answer from the server, so the bool is not telling you if you successfully joined a random room.
    Also, JoinRandomRoom has another "fail" callback than OnPhotonJoinRoomFailed. Implement: OnPhotonRandomJoinFailed.

    You can find more details and a walkthrough for these topics here:
    http://doc.exitgames.com/en/pun/current ... marco-polo
  • thetnswe
    Options
    that works perfectly.. thanks :)