SQL filter for matchmaking doesn't filter
Hi guys, have a nice day!
I want your help on this:
I create a room with a SQL filter but when I try to join it from other client, it ignore the filter.
Here is the creating code:
And here is the joining code:
and the OpJoinRandomRoom call
I want your help on this:
I create a room with a SQL filter but when I try to join it from other client, it ignore the filter.
Here is the creating code:
RoomOptions roomOptions = new RoomOptions ();
roomOptions.CleanupCacheOnLeave = true;
roomOptions.IsOpen = true;
roomOptions.IsVisible = true;
roomOptions.MaxPlayers = 2;
roomOptions.CustomRoomProperties = new Hashtable();
int minEntryRating = 900;
int maxEntryRating = 1100;
roomOptions.CustomRoomProperties.Add("C0", minEntryRating); // C0
roomOptions.CustomRoomProperties.Add("C1", maxEntryRating); // C1
roomOptions.CustomRoomPropertiesForLobby = new string[]{"C0", "C1"};
bool createRoomSucceeded = OpCreateRoom(null, roomOptions, TypedLobby.Default);
And here is the joining code:
client.OpJoinRandomRoom(null,0, MatchmakingMode.SerialMatching, null, "C0 < 1900 AND C1 > 1900");
and the OpJoinRandomRoom call
<pre class="CodeBlock"><code>public bool OpJoinRandomRoom(Hashtable expectedCustomRoomProperties, byte expectedMaxPlayers, MatchmakingMode matchmakingMode, TypedLobby lobby, string sqlLobbyFilter) { if (lobby == null ) { lobby = TypedLobby.Default; } this.State = ClientState.Joining; this.lastJoinType = JoinType.JoinRandomRoom; this.lastJoinActorNumber = 0; this.CurrentRoom = CreateRoom(null, new RoomOptions()); Hashtable playerPropsToSend = null; if (this.Server == ServerConnection.GameServer) { playerPropsToSend = this.LocalPlayer.AllProperties; } this.CurrentLobby = lobby; return this.loadBalancingPeer.OpJoinRandomRoom(expectedCustomRoomProperties, expectedMaxPlayers, playerPropsToSend, matchmakingMode, lobby, sqlLobbyFilter); }2 players match right away so maybe somethings is wrong with my filter?
0
Best Answer
-
Hi,
You set lobby type to TypedLobby.Default but it should be TypedLobby.SqlLobby in OpCreateRoom call.5
Answers
-
Hi,
You set lobby type to TypedLobby.Default but it should be TypedLobby.SqlLobby in OpCreateRoom call.5