Hi, Eero Pajarre wrote: > The problem is in line > > local w = debug.getinfo(2, "S").what > > where debug.getinfo returns nil Fix: local d = debug.getinfo(2, "S") local w = d and d.what or "C" Bye, Mike