Reputation: 2016
i used this code to join a room in photon:
TypedLobby sqlLobby = new TypedLobby(GAME_LOBBY_NAME, LobbyType.SqlLobby);
string sqlLobbyFilter = string.Format("L = {0}" , 8);
PhotonNetwork.JoinRandomRoom(null, 2, MatchmakingMode.FillRoom, sqlLobby, sqlLobbyFilter);
and this code to create a room :
RoomOptions newRoomOptions = new RoomOptions();
newRoomOptions.isOpen = true;
newRoomOptions.isVisible = true;
newRoomOptions.maxPlayers = 2;
// L is League
newRoomOptions.customRoomPropertiesForLobby = new string[] { "L" };
newRoomOptions.customRoomProperties = new ExitGames.Client.Photon.Hashtable() { { "L", 8 } };
TypedLobby sqlLobby = new TypedLobby(GAME_LOBBY_NAME, LobbyType.SqlLobby);
PhotonNetwork.CreateRoom(null, newRoomOptions, sqlLobby);
I get this code from Photon documentation https://doc.photonengine.com/en/pun/current/tutorials/matchmaking-and-lobby but this throws exceptions :
Operation failed: OperationResponse 225: ReturnCode: -2 (SQL logic error or missing database
no such column: L). Parameters: {} Server: MasterServer
Thanks.
Upvotes: 2
Views: 2297
Reputation: 56
Use C0..C9 properties instead of L.
from docs: Internally, SQL-lobbies list rooms in a SQLite table with up to 10 special "filtering-properties". Currently, the naming of those is fixed as: "C0", "C1" up to "C9".
Upvotes: 4