• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Jass problem

Status
Not open for further replies.
Level 2
Joined
Nov 16, 2008
Messages
24
What is wrong with this code, it says the "comparing two varibles of differnt primitive types (except real and integer) is not allowed" this occurs on line 3 (frist endfunction)

JASS:
function Trig_Pushback_Conditions takes nothing returns boolean
    return GetAttackedUnitBJ() == 'A000'
endfunction
    
function Trig_Pushback_Actions takes nothing returns nothing
    call UnitKnockTargetEx(GetTriggerUnit(), GetAttackedUnitBJ(), GetUnitFacing(GetTriggerUnit()), 250.00, 2.00, 1.00, "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageDeathCaster.mdl", "origin")
endfunction

//===========================================================================
function InitTrig_Pushback takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(trig, Condition(function Trig_Pushback_Conditions))
    call TriggerAddAction(trig, function Trig_Pushback_Actions)
    set trig = null
endfunction
 
Status
Not open for further replies.
Top