Commit c8ce42b3 authored by Max Maton's avatar Max Maton
Browse files

Fix syntax issues

parent b321cf32
Pipeline #3518 passed with stage
in 1 minute and 20 seconds
......@@ -143,15 +143,15 @@ public void RedirectToPopulatedServer()
Format(populatedServerQuery, sizeof(populatedServerQuery), "SELECT addr FROM `LobbyDB`.`servers` WHERE players >= %i AND password=0 AND isenabled=1 AND name NOT LIKE '%LOBBY%' ORDER BY players DESC LIMIT 1;", GetConVarInt(l_minplayers));
SQL_TQuery(hDatabase, RedirectToPopulatedServerCallback, populatedServerQuery);
}
private void RedirectToPopulatedServerCallback(Handle hDriver, Handle hResult, const char[] sError, int iData)
public void RedirectToPopulatedServerCallback(Handle hDriver, Handle hResult, const char[] sError, int iData)
{
if (hResult == INVALID_HANDLE) {
// The result is invalid -> an error occured
LogError("[Database] SQL-Query failed! Error: %s", sError);
return;
}
int rowCount = SQL_GetRowCount(hResult);
if (rowCount == 0)
int fullServerCount = SQL_GetRowCount(hResult);
if (fullServerCount == 0)
return; // No full server found.
char redirectAddress[128];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment