lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Nov 6, 2009 at 2:59 PM, zweifel <zweifel@gmail.com> wrote:
> I checked the arg variable and it is nil. I am reading things about
> debug.getinfo now, but I found nothing about anonymous calls...

Ah right, sorry I was thinking about scripts running from Lua itself.

Why not set a global to the name of the script before you launch it
with lua_pcall?  Or pass it as an argument?

(I'm thinking of how require() works; it passes the name of the
module, so that a module can be defined as

module(...)

That is, it picks up the name from the first argument)