Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-07-2010 , 09:33   Ham_TakeDamage problem
Reply With Quote #1

Something is wrong here:

PHP Code:
public monster_damaged(id,Inflictor,Attacker,Float:Damage,DamageBits
{
    if(
hvm_skill8[id] > 0)
    {
        new 
Floatmultiplier
        
switch(hvm_skill8[id])
        {
            case 
1multiplier 1.1
            
case 2multiplier 1.2
            
case 3multiplier 1.3
            
default: multiplier 1.0
        
}
        
        
SetHamParamFloat(4Damage multiplier)
        
g_Damage[Attacker] += Damage multiplier
        
    
}
    else
        
g_Damage[Attacker] += Damage

Throws out index out of bounds error. What does it come from? g_Damage is a floating number. The damage is handled well (I think), but the g_Damage is not changed. It worked without the if(hvm_skill8[id] > 0) check.
Backstabnoob is offline
 


Thread Tools
Display Modes

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 07:12.


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