When i add units to a local group called TempGroup inside a loop like this:
The code seems to stop at "call GroupAddUnit", the first message is displayed once, and the secound is never displayed.
Am i missing something or what? Shouldent this work, or is there a reason you can't add units in a loop like this?
(the if(true) is just so I know thats not whats wrong)
Code:
local group TempGroup
local integer i
set i = 1
loop
exitwhen i > 32
if ( true ) then
call DisplayTextToForce(GetPlayersAll(),"Before AddGroup")
call GroupAddUnit(TempGroup, udg_UnitArray[i])
call DisplayTextToForce(GetPlayersAll(),"Wont get here")
endif
set i=i+1
endloop
Am i missing something or what? Shouldent this work, or is there a reason you can't add units in a loop like this?
(the if(true) is just so I know thats not whats wrong)