Need help on error fixing
I dont get it, why can this error occur? Seems like its crashing the server after some time.
Is there any way to fix it? line 574: new plrHealth = get_user_health(id) L 06/19/2007 - 13:14:48: [AMXX] Run time error 4: index out of bounds L 06/19/2007 - 13:14:48: [AMXX] [0] phpy4ngxv.sma::doDamage (line 574) L 06/19/2007 - 13:14:48: [AMXX] Displaying debug trace (plugin "weapons.amxx") Code:
public doDamage(id){ |
Re: Need help on error fixing
Show the full code.
|
Re: Need help on error fixing
I'm assuming that is the "Damage" event handler. If so then post the way you registered the event.
Also note that get_user_attacker() can return a non-player id. |
Re: Need help on error fixing
1 Attachment(s)
Attached full source code
register_event("Damage", "doDamage", "b", "2!0") |
Re: Need help on error fixing
Changed event register to this:
register_event("Damage", "doDamage", "b", "2!0", "3=0", "4!0") and modified function code to this: Code:
public doDamage(id){however i noticed a compilation warning: /home/groups/amxmodx/tmp3/phpI8CxOi.sma(414) : warning 217: loose indentation what does it mean? thank you for any help |
Re: Need help on error fixing
Quote:
An example on loose indentation: Code:
public plugin_init() |
Re: Need help on error fixing
I was unable to replicate the native error.
|
| All times are GMT -4. The time now is 21:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.