Also I must learn to spell weird correctly... On 01/10/2014 19:05, Rob Probin wrote:
Just to makes sure we are on the same page with this: the line printed is from print() statement on the line that is *after* the line you do "done" command on and *before* the line with a breakpoint? The reason I want to confirm this is that debug hook should be reset when "done" is executed, so you should get "nil" instead of "function".Of course not :-) I'll try again: print(require('mobdebug')._VERSION, debug.gethook()) volume_fraction = time_fraction / attack print(require('mobdebug')._VERSION, debug.gethook())The first breakpoint is on the volume_fraction line. I don't remove this breakpoint - and there are more breakpoints later in sequence of the code.* It prints that version line * Then the breakpoint it hits then once * Then I hit "| |>" * Then I get "bad argument #1 to 'cororesume' (coroutine expected)" (appears in the application console). * No more version prints... are in either ZBS or the application consoleI don't believe it's running in a co-routine. The function is called from main.lua right after we 'require' that sound file.Is this code inside a coroutine by any chance?More evidence: print(coroutine.running()) print(require('mobdebug')._VERSION, debug.gethook()) volume_fraction = time_fraction / attack print(require('mobdebug')._VERSION, debug.gethook()) "thread: 0x1005823c0" true 0.606 function() --[[..skipped..]] end "crl" 0Are you using Lua 5.1, 5.2, or LuaJIT?Lua 5.2.2 Regards, Rob