Tinki3
Special Member
- Reaction score
- 418
My trigger has a small problem.
Whenever I save my map, it comes up with an error stating, "Expected '('".
The line that's not working is the one in bold.
I'm not sure as to why its not working, but if anyone could help, that'd be great.
EDIT: Nvm, I forgot to put "function" in before my function name
Whenever I save my map, it comes up with an error stating, "Expected '('".
The line that's not working is the one in bold.
Code:
function Freeze_Units_Actions_2 takes nothing returns nothing
if GetUnitUserData(GetEnumUnit()) > 0 then
call PauseUnit(GetEnumUnit(), true)
call SetUnitTimeScalePercent(GetEnumUnit(), 0.00)
call PolledWait((I2R(GetUnitUserData(GetEnumUnit())) * 0.50) + 0.50)
call PauseUnit(GetEnumUnit(), false)
call SetUnitTimeScalePercent(GetEnumUnit(), 100.00)
else
endif
endfunction
function Freeze_Units_Actions takes nothing returns nothing
local group g = CreateGroup()
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
[B]call ForGroup(g, Freeze_Units_Actions_2)[/B]
call DestroyGroup(g)
set g = null
endfunction
function InitTrig_Freeze_Units takes nothing returns nothing
set gg_trg_Freeze_Units = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Freeze_Units, 0.10 )
call TriggerAddAction( gg_trg_Freeze_Units, function Freeze_Units_Actions )
endfunction
I'm not sure as to why its not working, but if anyone could help, that'd be great.
EDIT: Nvm, I forgot to put "function" in before my function name