lua-users home
lua-l archive

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


Hi Ben,

I would just let __index point to a Lua table which has the method functions.

It's also a good idea to print out the error message from your script like this:

http://lua-users.org/lists/lua-l/2002-12/msg00046.html

If you want, you can use luaL_loadfile instead of luaL_loadbuffer.

You may also want to run your application within a call to lua_cpcall and print out any error message.

Cheers,

- Peter Shook


Lava_Monkey wrote:
ah ok, i see, they i was wondering y i wasnt getting any arguments,
so doing something like returning a call metatable(__call) when u call Load
and it goes to get(__index)
should fix the problem ?
and i guess its the fact that im calling a function but call doesnt handle
it, is the reason y the script
exits after the function it called.

    -Ben