Raised This Month: $ Target: $400
 0% 

Run time error 4 (Done)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 10-30-2013 , 17:10   Run time error 4 (Done)
Reply With Quote #1

I am using this:
PHP Code:
public plugin_init() {
    
RegisterHam(Ham_TakeDamage"player""ham_TakeDamage_Pre")
}

public 
ham_TakeDamage_Pre(victiminflictorattackerFloat:damagedamage_bits)
{
    if(!
is_user_connected(victim) || !is_user_connected(attacker))
        return 
HAM_IGNORED
        
    
if(g_Knife[attacker] && is_user_alive(attacker) && inflictor == attacker && get_user_weapon(attacker) == CSW_KNIFE)
    {        
        if(
damage >= && damage 30)
            
SetHamParamFloat(4250.0)
        
        else if(
damage >= 30)
            
SetHamParamFloat(4500.0)
    }
    
    return 
HAM_IGNORED


getting this error:
Code:
L 10/30/2013 - 21:40:38: [AMXX] Displaying debug trace (plugin "zbheroex_melee_combat.amxx")
L 10/30/2013 - 21:40:38: [AMXX] Run time error 4: index out of bounds 
L 10/30/2013 - 21:40:38: [AMXX]    [0] Untitled.sma::ham_TakeDamage_Pre (line 162) // In that code, line 7
__________________
Jhob94 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 23:19.


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