lua-users home
lua-l archive

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


On Friday 05 March 2004 04:52, Brett Bibby wrote:
> Ashwin,
> I'll give your suggestion a try. We need to do this because in our game all
> scripts are objects and when called as functions they execute as you would
> expect in Lua, but when they are used as parameters they always represent
> object ids to our engine.  I need the name of the function to resolve its
> object id in our engine. Cheers,

Wouldn't you be better off making your objects Lua tables and setting the 
__call metamethod? I.e. have objects that behave like functions rather than 
functions that behave like objects.

-- Jamie Webb