- Joined
- Oct 12, 2011
- Messages
- 3,449
I wonder am I recycling unit group using dynamic indexing correctly or not.. Please check..
I'm destroying them because I always create new group on cast.. please, tell me if I'm doing it wrong.. thanks..
EDIT:
I think I'm doing it wrong.. how about this? which is correct?
JASS:
call GroupClear(Group[i])
set Group[i] = Group[MaxIndex]
set Group[MaxIndex] = null
call DestroyGroup(Group[MaxIndex])
I'm destroying them because I always create new group on cast.. please, tell me if I'm doing it wrong.. thanks..
EDIT:
I think I'm doing it wrong.. how about this? which is correct?
JASS:
call DestroyGroup(Group[i])
set Group[i] = Group[MaxIndex]
set Group[MaxIndex] = null
call DestroyGroup(Group[MaxIndex])