21.11.2015, 14:57
Код:
new Gun[50][MAX_PLAYERS]; public OnPlayerSpawn(playerid) { SetTimerEx("GunTimer", 500, true, "i", playerid); return 1; } public GunTimer(playerid) { for(new i=0;i<50;i++) { if(Gun[i][playerid] == 42) { Gun[i][playerid] = 0; } } return 1; }
Код:
[15:24:13] [debug] Accessing element at index 50 past array upper bound 49 [15:24:13] [debug] AMX backtrace: [15:24:13] [debug] #0 000352f4 in ?? (0) from GunTest.amx [15:24:13] [debug] #1 000a2198 in public GunTimer (0) from GunTest.amx