- Joined
- Jul 10, 2008
- Messages
- 353
I have wasted 2 days and I still have no clue what am doing wrong. Please someone help.
My attempt:
Result g[j] is empty and gUAI returns 0
Am really pissed at this, I want to COPY a group into another, so i will have same units in 2 different groups, is this impossible?
My attempt:
JASS:
//WSgroups is global group array
local integer j=1
local group array g
loop
exitwhen j>8
if CountUnitsInGroup(WSgroups[j])>0 then
call GroupAddGroup(WSgroups[j],g[j]) //also i have tried GroupAddGroup(g[j],WSgroups[j])
call MyDisplay("g[j]: "+I2S(j)+" "+I2S(CountUnitsInGroup(g[j]))) //this display 0
loop
set u=FirstOfGroup(g[j])
exitwhen u==null
set gUAI=gUAI+1 //this displays 0 at the end of loop
set LocArrayX[gUAI]=GetUnitX(u)
set LocArrayY[gUAI]=GetUnitY(u)
set g6UnitArray[gUAI]=u
call GroupRemoveUnit(g[j],u)
endloop
call KillGroup(g[j])
endif
set j=j+1
endloop
call MyDisplay("unit number: "+I2S(gUAI)) //displays 0
Am really pissed at this, I want to COPY a group into another, so i will have same units in 2 different groups, is this impossible?
Last edited: