02.03.2013, 09:33
(
Последний раз редактировалось speed258; 04.03.2013 в 05:51.
)
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;
}