[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: cannot index a table loaded as a chunk
- From: Rici Lake <lua@...>
- Date: Fri, 20 Aug 2004 12:08:47 -0500
On 20-Aug-04, at 11:02 AM, Michael Newberry wrote:
lua_dofile returns 3.
Any Lua API which runs protected (i.e. returns an error status) should
be called with some variation on:
if (lua_api(L,...)) {
printf("%s\n", lua_tostring(L, -1));
} else {
...
}
or whatever your preferred style is.
Failing to take advantage of Lua's error messages is a good way to
make debugging more complicated. :)
Rici