http://www.lua.org/manual/5.3/manual.html#pdf-debug.getinfo For instance, the expression debug.getinfo(1,"n").name returns a table with a name for the current function, if a reasonable name can be found, and the expression debug.getinfo(print) returns a table with all available information about the print function. I guess debug.getinfo(1,"n").name is not a table, but debug.getinfo(1,"n") is. :) -- http://blog.codingnow.com