Raised This Month: $ Target: $400
 0% 

Attempting to fix Raptor Mod-Index Out of Bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 03-14-2009 , 11:19   Attempting to fix Raptor Mod-Index Out of Bounds
Reply With Quote #1

Code causing errors:
PHP Code:
new raptorreallife get_user_health(id);
        new 
raptorinvis = ((raptorreallife*100)/(raptorlife));
        
set_hudmessage(25525500.020.8706.01.0)
        
show_hudmessage(id"Invisibility:%d/100^n Health: %d"raptorinvisraptorreallife)
        
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha, (raptorinvisi-(raptorinvis*2))) 
Log:
Quote:
L 03/04/2009 - 17:507: [AMXX] Displaying debug trace (plugin "revoraptor5.amxx")
L 03/04/2009 - 17:507: [AMXX] Run time error 11: divide
L 03/04/2009 - 17:507: [AMXX] [0] revoraptor5.sma::client_PreThink (line 444)
Anyone know how to fix it? I've got everything else fixed and running so far but this.



New Issue:


Okay, after some more debugging I've discovered another issue.

PHP Code:
    if(israptor[attacker]!=&& attacker!=id && is_user_alive(attacker)){
        new 
victimhealth get_user_health(id)
        
set_user_health(idvictimhealth-raptordomage)
        new 
Float:vVel[3]
        for(new 
0;<= 2;i++)
        
vVel[i] = random_float(-10.0,10.0)            
        
entity_set_vector(id,EV_VEC_punchangle,vVel)
        
pain(id)
    } 
Error Log:

Quote:
L 03/15/2009 - 15:12:20: [AMXX] Displaying debug trace (plugin "revoraptor5.amxx")
L 03/15/2009 - 15:12:20: [AMXX] Run time error 4: index out of bounds
L 03/15/2009 - 15:12:20: [AMXX] [0] revoraptor5.sma::damaging (line 340)
Much appreciated if someone could help me out with this issue. I've just finished fixing the gun menu and this came up so I'm not quite sure on how to fix it.

Last edited by fang; 03-15-2009 at 21:25. Reason: new error discovered
fang is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode