|
On 16/02/15 11:21 PM, Paul K wrote:
Try this maybe? local function a() -- this defines a print("a") print("b") end local b = (loadstring or load)("function a()\n print(1)\n print(2)\nend\n return a") -- added "return a" for i in pairs(debug.getinfo(a, "L").activelines) do print("case a", i) end for i in pairs(debug.getinfo(b, "L").activelines) do print("case b", i) end -- now do for the main chunk for i in pairs(debug.getinfo(debug.getinfo(1, "f").func, "L").activelines) do print("case c", i) end -- and run b local d = b() for i in pairs(debug.getinfo(d, "L").activelines) do print("case d", i) end -- Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY. |