function LoadValues takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
//I want my unit back!
local unit u = LoadUnitHandle(hash, id, 0)
//And my timer dialog
local timerdialog td = LoadTimerDialogHandle(hash, id, 1)
....
endfunction
function start takes nothing returns nothing
local timer t = CreateTimer()
local integer id = GetHandleId(t)
//I want to save a unit
call SaveUnitHandle(hash, id, 0, unit)
//And a timer dialog
call SaveTimerDialogHandle(hash, id, 1, td)
call TimerStart(t, 5, false, function LoadValues)
set t = null
endfunction
local handle h = CreateTimer()
local handle h = CreateTimer()
call TimerStart(h, 5, true, null)
There is no problem in converting handle to timer, but I need to convert timer to handle
Thanks for the link. Unfortunately I don't understand what is the purpose of the libraryRead the last sentence in Post #3.