loadbans stock crashing the server
#4

pawn Код:
stock LoadTempBans()
{
    printf("[System] Loading Bans's....");
    new line[1024];
    for(new id = 0; id < MAX_BANS; id++)
    {
        format(GlobalQuery, sizeof(GlobalQuery), "SELECT * FROM Bans WHERE Banid = %d", id);
        mysql_query(GlobalQuery);
        mysql_store_result();
        if(mysql_num_rows() > 0)
        {
            if(mysql_fetch_row(line))
            {
            sscanf(line,"p<|>ds[24]s[16]ds[75]",TempBans[id][Banid],TempBans[id][BannedName],TempBans[id][BannedIP],TempBans[id][UnbanDate],TempBans[id][Reason]);
            if(strlen(TempBans[id][BannedName]) > 0) Bancount++;
            }
        }
    }
    return 1;
}
What is line? It has 1024 bytes and yet, apparent to that code, it has nothing in it? Yet you are querying it?
Reply


Messages In This Thread
loadbans stock crashing the server - by The_Gangstas - 01.12.2010, 19:52
Re: loadbans stock crashing the server - by JaTochNietDan - 01.12.2010, 20:08
Re: loadbans stock crashing the server - by The_Gangstas - 01.12.2010, 20:23
Re: loadbans stock crashing the server - by Ash. - 01.12.2010, 20:25
Re: loadbans stock crashing the server - by JaTochNietDan - 01.12.2010, 20:26
Re: loadbans stock crashing the server - by The_Gangstas - 01.12.2010, 20:36
Re: loadbans stock crashing the server - by JaTochNietDan - 01.12.2010, 21:03
Re: loadbans stock crashing the server - by The_Gangstas - 01.12.2010, 21:13
Re: loadbans stock crashing the server - by JaTochNietDan - 01.12.2010, 21:17
Re: loadbans stock crashing the server - by The_Gangstas - 01.12.2010, 22:10

Forum Jump:


Users browsing this thread: 3 Guest(s)