Hello There,
It seems I'm not setting up the sql lobby properly as whatever I do, the player still joins to the room which shouldn't according to the sql query. Since I couldn't find any C++ code example on your website, I would like to ask your help on what am I doing wrong with the following code snippets.
Here's how I setup the room first
RoomOptions MyOptions;
MyOptions.setIsVisible(isVisible);
MyOptions.setIsOpen(true);
MyOptions.setMaxPlayers(MaxPlayers);
ExitGames::Common::Hashtable MyCustomProperties;
MyCustomProperties.put("C0", playerRank);
MyOptions.setCustomRoomProperties(MyCustomProperties);
ExitGames::Common::JVector MyLobbyProperties;
MyLobbyProperties.addElement(JString("C0"));
MyOptions.setLobbyType(LobbyType::SQL_LOBBY);
MyOptions.setPropsListedInLobby(MyLobbyProperties);
MyClient->opCreateRoom(roomName,MyOptions);
Than here's how I try to join a random room
std::string MySqlString = "C0 >= " + cocos2d::StringUtils::toString(minPlayerRank) + " AND C0 <= " + cocos2d::StringUtils::toString(maxPlayerRank);
MyClient->opJoinRandomRoom(ExitGames::Common::Hashtable(), 0, MatchmakingMode::FILL_ROOM,ExitGames::Common::JString(), LobbyType::SQL_LOBBY, ExitGames::Common::JString(MySqlString.c_str()));
according to the "C0" value used to setup the room and the "C0" values in the sql query string, the player shouldn't be able to join to the room but it does. Could you please help me to identify what may be wrong?
Thanks,
Ozden
It seems I'm not setting up the sql lobby properly as whatever I do, the player still joins to the room which shouldn't according to the sql query. Since I couldn't find any C++ code example on your website, I would like to ask your help on what am I doing wrong with the following code snippets.
Here's how I setup the room first
RoomOptions MyOptions;
MyOptions.setIsVisible(isVisible);
MyOptions.setIsOpen(true);
MyOptions.setMaxPlayers(MaxPlayers);
ExitGames::Common::Hashtable MyCustomProperties;
MyCustomProperties.put("C0", playerRank);
MyOptions.setCustomRoomProperties(MyCustomProperties);
ExitGames::Common::JVector MyLobbyProperties;
MyLobbyProperties.addElement(JString("C0"));
MyOptions.setLobbyType(LobbyType::SQL_LOBBY);
MyOptions.setPropsListedInLobby(MyLobbyProperties);
MyClient->opCreateRoom(roomName,MyOptions);
Than here's how I try to join a random room
std::string MySqlString = "C0 >= " + cocos2d::StringUtils::toString(minPlayerRank) + " AND C0 <= " + cocos2d::StringUtils::toString(maxPlayerRank);
MyClient->opJoinRandomRoom(ExitGames::Common::Hashtable(), 0, MatchmakingMode::FILL_ROOM,ExitGames::Common::JString(), LobbyType::SQL_LOBBY, ExitGames::Common::JString(MySqlString.c_str()));
according to the "C0" value used to setup the room and the "C0" values in the sql query string, the player shouldn't be able to join to the room but it does. Could you please help me to identify what may be wrong?
Thanks,
Ozden