Help....
#1

Hi guys! Please help me!


Error:
[13:00:05] [debug] #0 0005ac74 in public OnPlayerTakeDamage () from rdm.amx
[13:00:09] [debug] Run time error 4: "Array index out of bounds"
[13:00:09] [debug] Accessing element at index 65535 past array upper bound 499
[13:00:09] [debug] AMX backtrace:


Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(kolokol[issuerid] == true) PlayerPlaySound(issuerid, 6401, 0.0, 0.0, 0.0);
if(PlayerInfo[issuerid][pGod] == 1) GameTextForPlayer(playerid, "~g~PLAYER HAS GOD MODE", 5000, 0);
return true;
}

Help
Reply
#2

The 65535 means INVALID_PLAYER_ID. It is used when the player takes damage from natural causes, such as falling. Put an INVALID_PLAYER_ID check before you use "issuerid" in an array.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
The 65535 means INVALID_PLAYER_ID. It is used when the player takes damage from natural causes, such as falling. Put an INVALID_PLAYER_ID check before you use "issuerid" in an array.
Can you edit my code? Please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)