04.05.2017, 19:11
PHP код:
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new s[20];
format(s, 20, "-Damage %.0f", amount);
TextDrawSetString(TakeDamage[playerid], s);
TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
if(pClass[issuerid][Harshal] == 1)
{
if(weaponid == 25)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 75);
}
}
return 1;
}
Код:
[20:59:07] [debug] Run time error 4: "Array index out of bounds" [20:59:07] [debug] Attempted to read/write array element at index 65535 in array of size 1000 [20:59:07] [debug] AMX backtrace: [20:59:07] [debug] #0 001456cc in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=3.30000, weaponid=54, ... <1 argument>) at D:\samp folder\ZoneX - ZX\gamemodes\ZoneX.pwn:8954 [20:59:09] [debug] Run time error 4: "Array index out of bounds" [20:59:09] [debug] Attempted to read/write array element at index 65535 in array of size 1000 [20:59:09] [debug] AMX backtrace: [20:59:09] [debug] #0 001456cc in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=3.30000, weaponid=54, ... <1 argument>) at D:\samp folder\ZoneX - ZX\gamemodes\ZoneX.pwn:8954