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

Keep query the same, iterate in reverse.

parent 5f795539
Pipeline #5865 failed with stage
in 1 minute and 11 seconds
......@@ -984,7 +984,7 @@ public Action StartVote()
SetMenuExitButton(VoteHandle, false);
SetMenuTitle(VoteHandle, "[Lobby] Which server to join?");
for(int ServerCount=1; ServerCount<=rowCount; ServerCount++)
for(int ServerCount=rowCount; ServerCount>=1; ServerCount--)
{
int ServerIndex = ServerCount - 1;
Format(ServerVoteItem[ServerIndex], 256, "%s [max %s players] \n %s", namex[ServerIndex], maxplayersx[ServerIndex], mapx[ServerIndex]);
......@@ -1231,7 +1231,7 @@ public void RSAllServersAddr(Handle RShDriver, Handle RShResult, const char[] sE
//char[] ServerIndexChar = new char[64];
//IntToString(ServerIndex, ServerIndexChar, 64);
char RSGetAllServersAddrEach[1024];
Format(RSGetAllServersAddrEach, sizeof(RSGetAllServersAddrEach), "SELECT addr, players, bots FROM `LobbyDB`.`servers` WHERE password=0 AND isenabled=1 AND name NOT LIKE '%%LOBBY%%' AND addr!='80.112.155.100:27015' AND addr!='80.112.155.100:27017' ORDER BY players ASC LIMIT %i,1;", ServerIndex);
Format(RSGetAllServersAddrEach, sizeof(RSGetAllServersAddrEach), "SELECT addr, players, bots FROM `LobbyDB`.`servers` WHERE password=0 AND isenabled=1 AND name NOT LIKE '%%LOBBY%%' AND addr!='80.112.155.100:27015' AND addr!='80.112.155.100:27017' ORDER BY players DESC LIMIT %i,1;", ServerIndex);
//PrintToServer("%s", ServerIndexChar);
SQL_TQuery(hDatabase, RSInfoOfServer, RSGetAllServersAddrEach, ServerIndex);
}
......
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