24.08.2016, 10:29
[11:28:19] [debug] AMX backtrace:
[11:28:19] [debug] #0 000bdf90 in ?? (... <5 arguments>) at G:\ZS\gamemodes\gamemodes\gamemodes\bttdmzmapocaly pse.pwn:8900
[11:28:19] [debug] #1 000130ac in public OnPlayerGiveDamage (playerid=37, damagedid=166, Float:amount=0.00000, weaponid=1196588, bodypart=589824) at G:\ZS\pawno\include\YSI\y_hooks/impl.inc:2396
[11:28:19] [debug] Run time error 4: "Array index out of bounds"
[11:28:19] [debug] Accessing element at index 167 past array upper bound 99
[11:28:19] [debug] AMX backtrace:
[11:28:19] [debug] #0 000be334 in ?? (... <5 arguments>) at G:\ZS\gamemodes\gamemodes\gamemodes\bttdmzmapocaly pse.pwn:8930
[11:28:19] [debug] #1 00012f00 in public OnPlayerTakeDamage (playerid=37, issuerid=167, Float:amount=0.00000, weaponid=1655482, bodypart=458752) at G:\ZS\pawno\include\YSI\y_hooks/impl.inc:2349
[11:28:19] [debug] Run time error 4: "Array index out of bounds"
[11:28:19] [debug] Accessing element at index 168 past array upper bound 99
Code:
Also how to prevent this:
[09:40:34] [debug] Run time error 4: "Array index out of bounds"
[09:40:34] [debug] Accessing element at index 32 past array upper bound 31
[09:40:34] [debug] AMX backtrace:
[09:40:34] [debug] #0 000007d0 in public OnPlayerCommandText (playerid=28, cmdtext[]=@01134200 "/pizzajob/pizzajob/pizzajob/pizzajob") at G:\ZS\pawno\include\zcmd.inc:94
This guy types incorrect command with more slashes as the actual command is /pizzajob
[11:28:19] [debug] #0 000bdf90 in ?? (... <5 arguments>) at G:\ZS\gamemodes\gamemodes\gamemodes\bttdmzmapocaly pse.pwn:8900
[11:28:19] [debug] #1 000130ac in public OnPlayerGiveDamage (playerid=37, damagedid=166, Float:amount=0.00000, weaponid=1196588, bodypart=589824) at G:\ZS\pawno\include\YSI\y_hooks/impl.inc:2396
[11:28:19] [debug] Run time error 4: "Array index out of bounds"
[11:28:19] [debug] Accessing element at index 167 past array upper bound 99
[11:28:19] [debug] AMX backtrace:
[11:28:19] [debug] #0 000be334 in ?? (... <5 arguments>) at G:\ZS\gamemodes\gamemodes\gamemodes\bttdmzmapocaly pse.pwn:8930
[11:28:19] [debug] #1 00012f00 in public OnPlayerTakeDamage (playerid=37, issuerid=167, Float:amount=0.00000, weaponid=1655482, bodypart=458752) at G:\ZS\pawno\include\YSI\y_hooks/impl.inc:2349
[11:28:19] [debug] Run time error 4: "Array index out of bounds"
[11:28:19] [debug] Accessing element at index 168 past array upper bound 99
Code:
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { if(playerid != INVALID_PLAYER_ID) { if(team[playerid] != team[damagedid]) // Line 8900 { //code } if(team[playerid] == TEAM_HUMAN) { if(team[damagedid] == TEAM_ZOMBIE) { if(IsPlayerInRangeOfPoint(damagedid, 7.0,Map[P],Map[Q],Map[R])) { if(team[playerid] == TEAM_HUMAN) { //code } } } } } return 1; } public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid , bodypart) { DamageTaken[playerid] = 1; new Float:hp; if(issuerid != INVALID_PLAYER_ID) { PlayerShotPlayer[issuerid][playerid] = 1; // Line 8930 } return 1; }
Also how to prevent this:
[09:40:34] [debug] Run time error 4: "Array index out of bounds"
[09:40:34] [debug] Accessing element at index 32 past array upper bound 31
[09:40:34] [debug] AMX backtrace:
[09:40:34] [debug] #0 000007d0 in public OnPlayerCommandText (playerid=28, cmdtext[]=@01134200 "/pizzajob/pizzajob/pizzajob/pizzajob") at G:\ZS\pawno\include\zcmd.inc:94
This guy types incorrect command with more slashes as the actual command is /pizzajob