Why OnPhotonJoinRoomFailed was called?

Options
carmine
carmine ✭✭
I was getting a weird error last night where I couldn't join a particular room, but I could join others. What was weird was the OnPhotonJoinRoomFailed was called IMMEDIATELY... as if it didn't even make the trip to the server. I was able to join other rooms in my game and they behaved as normal.

- Is there a way to find out why this was called? Or any insight into this?
- Also, is there any limitation on a room's name? Number of characters, not allowed characters etc? Are is any string fine?

Thanks!

-Carmine

Comments

  • Tobias
    Options
    Any string is fine and there should not be a restriction for room names. I wouldn't actually use super long strings but aside from bandwidth conversation: no real limit.

    I have no clue why joining that room immediately failed. Maybe it was full? Then the master can immediately reject you and this is as fast as a roundtrip.
    You could try to log the response code and response.ToStringFull() in: NetworkingPeer.OnOperationResponse() case OperationCode.JoinGame.
  • carmine
    Options
    Tobias wrote:
    Any string is fine and there should not be a restriction for room names. I wouldn't actually use super long strings but aside from bandwidth conversation: no real limit.

    I have no clue why joining that room immediately failed. Maybe it was full? Then the master can immediately reject you and this is as fast as a roundtrip.
    You could try to log the response code and response.ToStringFull() in: NetworkingPeer.OnOperationResponse() case OperationCode.JoinGame.

    Where are the response code? Is it passed to the function?

    void OnPhotonJoinRoomFailed(... does something go here?)
    {
    string lastError = PhotonNetwork.some-how-get-last-error ??

    -Carmine
  • Tobias
    Options
    At the moment, this info is not passed to OnPhotonJoinRoomFailed.
    You can only grab it in NetworkingPeer.OnOperationResponse() case OperationCode.JoinGame.

    It should not be too difficult in PUN to add an override with a reason parameter but for the time being you need to modify the PUN source.