18.07.2013, 14:40
Код:
[17:44:07] [debug] Run time error 4: "Array index out of bounds" [17:44:07] [debug] Accessing element at negative index -1 [17:44:07] [debug] AMX backtrace: [17:44:07] [debug] #0 00031754 in public ShowStats (0x00000001, 0x00000001) from wgm.amx [17:44:07] [debug] #1 000f3a24 in public cmd_stats (0x00000001, 0x001daf28) from wgm.amx [17:44:07] [debug] #2 native CallLocalFunction () [00471e90] from samp-server.exe [17:44:07] [debug] #3 00007040 in public OnPlayerCommandText (0x00000001, 0x001daf0c) from wgm.amx
pawn Код:
CMD:stats(playerid, params[])
{
if (gPlayerLogged[playerid] != 0)
{
ShowStats(playerid,playerid);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
}
return 1;
}
#define function%0(%1) forward %0(%1); public %0(%1)
function ShowStats(playerid,targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
SendClientMessage(playerid, COLOR_GREEN,"My Stats");
}
return 1;
}