loadbans stock crashing the server
#1

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;
}
its crashing it.. idk why. it prints loading bans then crashes.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)