- Joined
- Nov 30, 2007
- Messages
- 1,202
if my structs contains a variable with an array, does every element have to be set to 0 for me to be able to increase it?
Is this required:
to use this method:
Is this required:
JASS:
method init_bTypeCount takes nothing returns nothing
local integer i = 1
loop
exitwhen i == MAX_BUILDING_TYPES
set .bTypeCount[i] = 0
set i = i + 1
endloop
endmethod
to use this method:
JASS:
method inc_bTypeCount takes integer index returns nothing
set .bTypeCount[index] = .bTypeCount[index] + 1
endmethod