lua-users home
lua-l archive

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


>1. According to the manual section 3.10 lua_load return 0, LUA_ERRSYNTAX or LUA_ERRMEM. Due to an error in my chunk loader where I wasn't reading enough bytes, I got error code 1 which is not one of these three. 

Code 1 is LUA_ERRRUN, which can be raised when loading precompiled chunks.
I guess this is a bug in the manual.

>2. The manual also states that it pushes the chunk as a function onto the stack. Does this mean I always need to do a lua_call to get the chunk processed?

Yes. But you can also store it in a table or do something else.
--lhf