I have an ability, quite simple really but I was a bad boy and just made it in GUI and converted it and added locals to make MUI and it gives me 4 “expected a code statement”
Here's the code:
Here's the code:
Code:
function Trig_Fire_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Fire_Copy_Actions takes nothing returns nothing
call UnitAddAbilityBJ( udg_Firea[GetUnitAbilityLevelSwapped('A000', GetTriggerUnit())], GetSpellTargetUnit() )
call TriggerSleepAction( 2 )
call UnitRemoveAbilityBJ( udg_Firea[GetUnitAbilityLevelSwapped('A000', GetSpellAbilityUnit())], GetSpellTargetUnit() )
endfunction
//===========================================================================
function InitTrig_Fire_Copy takes nothing returns nothing
set gg_trg_Fire_Copy = CreateTrigger( )
local TU unit
Set TU = GetTriggerUnit()
local CU unit
Set CU = GetSpellAbilityUnit()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire_Copy, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Fire_Copy, Condition( function Trig_Fire_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Fire_Copy, function Trig_Fire_Copy_Actions )
endfunction