hgkjfhfdsj
Active Member
- Reaction score
- 55
any ideas on how to store arrays into hashtable? i got confused when it asked for index..eg
how does unit get saved into the hashtable? and my main question is how to i load it? do i need to make another loop?? and do i use that second '0' as an array index? if so how?
JASS:
local timer t = CreateTimer()
loop
exitwhen i == 5
set udg_Wisp<i> = CreateUnit()
call SaveUnit(Hashtable, 0, GetHandleId(t), udg_Wisp<i>)
set i = i + 1
endloop</i></i>
how does unit get saved into the hashtable? and my main question is how to i load it? do i need to make another loop?? and do i use that second '0' as an array index? if so how?
JASS:
local timer t = CreateTimer()
loop
exitwhen i == 5
set udg_Wisp<i> = CreateUnit()
call SaveUnit(Hashtable, i, GetHandleId(t), udg_Wisp<i>)
set i = i + 1
// ...
set wisp<i> = LoadUnit(Hashtable, i, GetHandleId(t))
endloop</i></i></i>