Okay, I'm having some trouble with a line of code. For some reason, my function is cutting out at a wait, it just doesn't make sence.
Here's my function:
It cuts out perfectly at the wait. Nothing after it works. My first debug msg displays 5.000 & 110 respectively, meaning the wait is only 5 seconds. It just dies at the sleep action. This doesnt make any sence! Can anyone shed some light on this?
Here's my function:
JASS:
function ParsedMainstream takes nothing returns nothing
local gamecache g = LocalVars()
local timer t = GetExpiredTimer()
local real x = GetHandleReal(t, "pmsx")
local real y = GetHandleReal(t, "pmsy")
local real ti = GetHandleReal(t, "pmsti")
local integer d = GetHandleInt(t, "pmsd")
local integer I = 0
local timer array ta
call BJDebugMsg(R2S(ti) + " " + I2S(GetHandleInt(g, "ENDPARSEDSESSION")))
loop
set I = I + 1
set ta[I] = CreateTimer()
call BJDebugMsg("Whoa.")
call TriggerSleepAction(ti)
call BJDebugMsg("Cuts out here.")
exitwhen(GetHandleInt(g, "ENDPARSEDSESSION") == 111)
call SetHandleHandle(ta[I], "truble", CreateUnit(Player(11), 'h002', x, y, d))
call TimerStart(ta[I], 2.00, true, function TimedUnitMove)
endloop
call PauseTimer(t)
call DestroyTimer(t)
set t = null
endfunction
It cuts out perfectly at the wait. Nothing after it works. My first debug msg displays 5.000 & 110 respectively, meaning the wait is only 5 seconds. It just dies at the sleep action. This doesnt make any sence! Can anyone shed some light on this?
Last edited: