crash
#1

Why my code crash after "second check"? please help my solve because i working on this script 6 hours please help me to solve the problem
pawn Код:
stock LoadPlayerBan(playerid)
{
    mysql_format(duomenys, querys, "SELECT Time FROM `bans` WHERE `Name` = '%s'", PlayerName(playerid));
    mysql_function_query(data, querys, true, "OnLoadPlayerBan", "i", playerid);
    print("load bans");
}

forward OnLoadPlayerBan(playerid);
public OnLoadPlayerBan(playerid)
{
    print("ban start");
    if(!IsPlayerNPC(playerid))
    {
        new rows, fields;
        cache_get_data(rows, fields, data);

        if(rows)
        {
            print("first check");
            new timeban[MAX_PLAYERS] = 0;
            print("second check"); /// when this print server get crash
            cache_get_row(0, 3, timeban[playerid], data);
            print("third check");
            printf("Time: %d",timeban[playerid]);
   
            if(gettime() < timeban[playerid])
            {
                SendClientMessage(playerid,RED,"timeban exist test test test");
                Kick(playerid);
                print("completed timestamp");
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
crash - by speed258 - 02.03.2013, 09:33
Re: crash - by ¤Adas¤ - 02.03.2013, 09:47
Re: crash - by speed258 - 02.03.2013, 09:54
Re: crash - by AndreT - 02.03.2013, 09:54
Re: crash - by speed258 - 02.03.2013, 10:04
Re: crash - by speed258 - 03.03.2013, 16:24

Forum Jump:


Users browsing this thread: 2 Guest(s)