17.11.2016, 20:56
Код HTML:
23:11:55] [debug] Run time error 4: "Array index out of bounds" [23:11:55] [debug] Accessing element at index 65535 past array upper bound 999 [23:11:55] [debug] AMX backtrace: [23:11:55] [debug] #0 00091f60 in public cmd_dfile (playerid=5, params[]=@013a4a8c "12Faby") at D:\server\gm.pwn:9836 [23:11:55] [debug] #1 native CallLocalFunction () from samp03svr [23:11:55] [debug] #2 00000ab4 in public OnPlayerCommandText (playerid=5, cmdtext[]=@013a4a48 "/dfile 12Lem0neL") at D:\server\pawno\include\zcmd.inc:108
Код HTML:
CMD:dfile(playerid, params[])
{
new id, szPlayerName2[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SCM(playerid, -1, "Syntax: /dfile <playerid>");
if(PlayerData[playerid][pJob] == 1)
{
if(PlayerData[playerid][pO] == 1000)
{
GetPlayerName(id, szPlayerName2, MAX_PLAYER_NAME);
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "* %s open a file.", szPlayerName);
SCM(id, COLOR_YELLOW, szMessage);
PlayerData[playerid][pO] = id;
PlayerData[id][pDosar] = 2;
format(szMessage, sizeof(szMessage), "* You open %s 's file.", szPlayerName2);
SCM(playerid, COLOR_YELLOW, szMessage);
}
}
else
{
SCM(playerid, -1, "You are not a detective!");
}
return 1;
}