[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: function name
- From: Jamie Webb <j@...>
- Date: Fri, 5 Mar 2004 11:55:48 +0000
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