Reputation: 1
The room settings are the same, why every time when there is already a created room, the player does not connect there, and creates a new one? I get this warning: Operation failed: OperationResponse 225: ReturnCode: 32760 (No match found). Parameters: {}
public void StartMatchMaking(){
Debug.LogError(CreateRoomProperties());
PhotonNetwork.JoinRandomRoom(CreateRoomProperties(), 4);
}
ExitGames.Client.Photon.Hashtable CreateRoomProperties()
{
return new ExitGames.Client.Photon.Hashtable
{
{"bet", bet}
};
}
private void OnPhotonRandomJoinFailed(object[] codeAndMsg)
{
CreateRoom();
}
public void CreateRoom(){
ExitGames.Client.Photon.Hashtable ht = new ExitGames.Client.Photon.Hashtable();
RoomOptions ro = new RoomOptions();
ht.Add("bet", bet);
ro.CustomRoomProperties = ht;
Debug.LogError(ro.CustomRoomProperties);
PhotonNetwork.CreateRoom(""+PhotonNetwork.player.NickName, ro, TypedLobby.Default);
}
void OnPhotonPlayerConnected(PhotonPlayer otherPlayer)
{
Debug.Log("New player: " + otherPlayer.NickName);
}
Upvotes: 0
Views: 372
Reputation: 1
Need to add properties to roomsettings
customRoomPropertiesForLobby = CreateRoomPropertiesForLobby();
string[] CreateRoomPropertiesForLobby()
{
return new string[]
{
"bet"
};
}
Upvotes: 0