HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

JASS trig condition error

02-25-2006, 04:13 AM#1
TaintedReality
Ok, well just as background I'm just learning to use JASS, this is really the first time I've tried to make a whole map with JASS instead of triggers.

My problem is I keep getting the error "Different Types With call "TriggerAddCondition":triggercondition,handle".
Collapse JASS:
function InitTrig_HeroAttacks takes nothing returns nothing
    call TriggerAddCondition(trg_HeroAttacks, Condition(function trg_HeroAttacks_Conditions)
endfunction

Collapse JASS:
function trg_HeroAttacks_Conditions takes nothing returns boolean
    if( (IsUnitType(GetEventDamageSource(), UNIT_TYPE_HERO) == TRUE) then
        return TRUE
    endif
    return FALSE
endfunction

I'm using a global trigger variable for trg_HeroAttacks. I've messed around, but that line looks exactly like the GUI Trigs transformed to JASS, and the same as in Vex's tutorial on this. The event is the unit takes damage event, so I'm doing that from another function that runs on map init (since it's specific unit). Haven't put the action in yet because the condition won't work =P. Thanks for the help, most errors I can figure out on my own by messing around, but this one just won't go away.
02-25-2006, 07:41 AM#2
Anitarf
You lack one ")" at the end of the add condition line.
02-25-2006, 04:02 PM#3
TaintedReality
Oh damn..I hate when I miss something dumb like that. Well, thanks for noticing it, no errors anymore.