15.03.2017, 22:50
[16:33:21] [debug] Run time error 4: "Array index out of bounds"
[16:33:21] [debug] Attempted to read/write array element at index 65535 in array of size 90
[16:33:21] [debug] AMX backtrace:
[16:33:21] [debug] #0 0002c3b0 in ?? (27, 65535, 1079194420, 54) from Mundito.amx
[16:33:21] [debug] #1 0000ff18 in public OnPlayerTakeDamage (27, 65535, 1079194420, 54, 3) from Mundito.amx
help me D:
[16:33:21] [debug] Attempted to read/write array element at index 65535 in array of size 90
[16:33:21] [debug] AMX backtrace:
[16:33:21] [debug] #0 0002c3b0 in ?? (27, 65535, 1079194420, 54) from Mundito.amx
[16:33:21] [debug] #1 0000ff18 in public OnPlayerTakeDamage (27, 65535, 1079194420, 54, 3) from Mundito.amx
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
new Float:Vida;
GetPlayerHealth(playerid, Vida);
//==damage
#if defined SHOWN_ON_SCOREBOARD
totalDmg[issuerid] += amount;
SetPlayerScore(issuerid, floatround(totalDmg[issuerid]));
#endif
currentHpLoss[0][issuerid][playerid] += amount;
currentHpLoss[1][playerid][issuerid] += amount;
new
nick[MAX_PLAYER_NAME],
buffer[128];
GetPlayerName(playerid, nick, MAX_PLAYER_NAME);
format(buffer, 128, "~g~~h~~h~%s~n~~g~~h~~h~%i (%s)", nick, floatround(currentHpLoss[0][issuerid][playerid]), weaponName[weaponid]);
TextDrawSetString(txd[0][issuerid], buffer);
GetPlayerName(issuerid, nick, MAX_PLAYER_NAME);
format(buffer, 128, "~r~~h~%s~n~~r~~h~-%i (%s)", nick, floatround(currentHpLoss[1][playerid][issuerid]), weaponName[weaponid]);
TextDrawSetString(txd[1][playerid], buffer);
txdAlpha[0][issuerid] = 0xFF;
txdAlpha[1][playerid] = 0xFF;
return 1;
}