13.12.2015, 04:07
Since this is really the first time this happened to me, I have no idea how to solve it.
Line 4800
If you need anymore (like the zone script) I'll post it.
PHP код:
CMD:test(playerid, params[])
{
new string[128];
if(isnull(params))
return SendClientMessage(playerid, -1, "No params");
format(string, sizeof(string), "TEST: %s (TEST LOCATION: %s)", PlayerName(playerid), zones[player_zone[playerid]][zone_name]);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "TEST DESC: %s", params);
SendClientMessage(playerid, -1, string);
return 1;
}
Код:
[00:57:17] [debug] Run time error 4: "Array index out of bounds" [00:57:17] [debug] Accessing element at negative index -1 [00:57:17] [debug] AMX backtrace: [00:57:17] [debug] #0 0003c1fc in public cmd_test (playerid=0, params[]=@0x00039734 "hsdghsdhgsdg") at C:\xampp\htdocs\samp\gamemodes\wat.pwn:4800 [00:57:17] [debug] #1 native CallLocalFunction () [004743b0] from samp-server.exe [00:57:17] [debug] #2 000008e0 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x000396e8 "/test hsdghsdhgsdg") at C:\xampp\htdocs\samp\pawno\include\zcmd.inc:111
PHP код:
format(string, sizeof(string), "TEST: %s (TEST LOCATION: %s)", PlayerName(playerid), zones[player_zone[playerid]][zone_name]);