Index out of bounds question
So i have this issue, maybe someone can help me.
Run time error 4: index out of bounds Line: UserDamage[attacker] += damage; The stragest thing i've seen is that userdamage is properly defined: new Float:UserDamage[33] SO WTF ? What can it be ? I don't have more that 32 players on the server :)) |
Re: Index out of bounds question
Depends on your usage of attacker, it might not be a player
|
Re: Index out of bounds question
yes, indeed. It's used in a npc plugin, but the awkward thing is that the npc shouldn't take damage to himself.
Code:
public TakeDamage(victim, weapon, attacker, Float:damage, damagetype) { |
Re: Index out of bounds question
I said attacker, not victim
|
Re: Index out of bounds question
well, that's the bizzare question.
That's the actual code line, no tricks, not so ever. I hardly know if it's attacker or victim, that's why i asked for you help. |
Re: Index out of bounds question
post full code.
|
Re: Index out of bounds question
The attacker is not a player. Check and make sure that it is a valid player.
|
| All times are GMT -4. The time now is 13:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.