Cant create room with custom properties.

Options
Code:
string[] roompropsInLobby = { "gm", "rs", "bs", "t" }; Hashtable customroomProperties = new Hashtable() { { "gm", activGamemode }, { "rs", 0 }, { "bs", 0 }, { "t", 3.00f } }; RoomOptions roomOptions = new RoomOptions (){isOpen = true, isVisible = true, maxPlayers = cmaxendbyte}; PhotonNetwork.CreateRoom(roomName.text, roomOptions, customroomProperties, roompropsInLobby);
But in the PhotonNetwork.cs is no static bool for custom properties.
Only:
bool CreateRoom(string roomName)
and
bool CreateRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby)
and
bool CreateRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby, string[] expectedUsers)
PLS fix or help me.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2015
    Options
    Try this:
    
    string[] roompropsInLobby = { "gm", "rs", "bs", "t" };
    Hashtable customroomProperties = new Hashtable() { { "gm", activGamemode }, { "rs", 0 }, { "bs", 0 }, { "t", 3.00f } };
    RoomOptions roomOptions = new RoomOptions (){isOpen = true, isVisible = true, maxPlayers = cmaxendbyte};
    roomOptions.CustomRoomProperties = customroomProperties;
    roomOptions.CustomRoomPropertiesForLobby = roompropsInLobby;
    TypedLobby typedLobby = TypedLobby.Default; // change this if needs be
    PhotonNetwork.CreateRoom(roomName.text, roomOptions, typedLobby);
    
    Here is a similar question.
  • Hollo1001
    Options
    Nice thanks for the help.
    Users like u are very great.