- Joined
- Nov 3, 2013
- Messages
- 989
Why doesn't this work?
I'm saving numbers from 0 and up to later let me use combinations of unit handles & ability raw codes as parent keys.
I don't have the data so I wanted it to be a bit dynamic to just let me fill in the raw codes later.
edit: removed useless stuff and updated with indents and removed empty comments.
I'm saving numbers from 0 and up to later let me use combinations of unit handles & ability raw codes as parent keys.
I don't have the data so I wanted it to be a bit dynamic to just let me fill in the raw codes later.
edit: removed useless stuff and updated with indents and removed empty comments.
JASS:
function Trig_buildSys_store_loops_Copy_2_Actions takes nothing returns nothing
local integer i = 0
local integer j
local integer a = 0
local integer h = 1
local integer aId
// unit handle id
set udg_buildSys_init_unit[0] = gg_unit_o001_0001
set udg_buildSys_init_unit[1] = gg_unit_o001_0002
// ability raw codes
set udg_buildSys_init_abilityId[0] = 'A000'
set udg_buildSys_init_abilityId[1] = 'A001'
set udg_buildSys_init_abilityId[2] = 'A002'
// ----------------------------------
loop
exitwhen udg_buildSys_init_abilityId[a] == 0
set a = a +1
endloop
call DisplayTextToForce( GetPlayersAll(), (I2S(a) ) )
loop
exitwhen h == 0
set h = GetHandleId( udg_buildSys_init_unit[i] )
call DisplayTextToForce( GetPlayersAll(), (I2S(h) ) )
set j = 0
set aId = 1
loop
exitwhen aId == 0
set aId = udg_buildSys_init_abilityId[i]
call DisplayTextToForce( GetPlayersAll(), (I2S(aId) ) )
call SaveInteger(udg_hash_buildSys, h, aId, i * a + j)
set j = j +1
endloop
set i = i +1
endloop
endfunction
//===========================================================================
function InitTrig_buildSys_store_loops_Copy_2 takes nothing returns nothing
set gg_trg_buildSys_store_loops_Copy_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_buildSys_store_loops_Copy_2, function Trig_buildSys_store_loops_Copy_2_Actions )
endfunction
Last edited: