- Joined
- Jun 30, 2008
- Messages
- 580
I am making a system that I believe will be using around 5 to 6 loops. Is this a problem? Is there an alternative to using loops that are more efficient.
Basically there will be methods for users to use to add a certain thing to the info with the struct:
call name.AddUnit(XunitX)
call name.AddUnit(XunitX2)
etc.
And the only way I can think of in the system that uses this info, is in the method have:
and in the system it will run through .array to find the right .unit.
and I will have several of these, is there any other alternative or does it not matter?
Basically there will be methods for users to use to add a certain thing to the info with the struct:
call name.AddUnit(XunitX)
call name.AddUnit(XunitX2)
etc.
And the only way I can think of in the system that uses this info, is in the method have:
JASS:
method AddUnit takes unit u returns nothing
set .array = .array+1
set .unit[array] = u
endmethod
and in the system it will run through .array to find the right .unit.
and I will have several of these, is there any other alternative or does it not matter?