Guys i need help from you, units aren't created, if someone could help me with this trigger.
JASS:
function action2 takes nothing returns nothing
local integer a
local integer c = 2
local integer counter = 0
local integer b = 3
set a = a + 1
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_009" )
loop
exitwhen counter > c
call CreateUnitAtLoc( Player(11), udg_UnitTypeSpawn[a], GetRectCenter(udg_SpawnRegion[GetRandomInt(1,b)]),180.)
call IssuePointOrderLoc( GetLastCreatedUnit(), "attack", GetRectCenter(gg_rct_Base_Center_1))
set counter = counter + 1
endloop
endfunction
function action takes nothing returns nothing
local timer timerz
call TimerStart( timerz, 2., true, function action2)
endfunction
function InitTrig_SpawnTimer takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEventSingle(t, 1.)
call TriggerAddAction(t, function action)
endfunction