- 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