Search Unity

OnCreateRoomFailed(object[] codeAndMsg) problem getting data.

Discussion in 'Multiplayer' started by wobbier, Jan 21, 2015.

  1. wobbier

    wobbier

    Joined:
    Jan 21, 2015
    Posts:
    1
    when using the methods in the following image from the photon api the object array doesn't contain any data.


    The code:
    Code (csharp):
    1.  
    2.     void OnPhotonCreateRoomFailed(object[] codeAndMsg) {
    3.         MessageBox.DisplayMessage("Failed to create room.", (string)codeAndMsg[0]);
    4.     }
    5.  
    but photon isn't giving me that data?

    i've tried codeAndMsg[0] also and it's still out of range.
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    Hmm. This seems to be a bug in PUN.
    You should be able to fix this quickly until we update.

    In NetworkingPeer.OnOperationResponse, find
    SendMonoMessage(PhotonNetworkingMessage.OnPhotonCreateRoomFailed).​

    It should be:
    SendMonoMessage(PhotonNetworkingMessage.OnPhotonCreateRoomFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);​

    That should help.
    Else, please include the stack trace from the console in another post. Copy and paste it (don't screenshot it).
    Thanks.