|
|
||
|
Warning - in my sample, i wrote:
if (status != 0) {
last_error = lua_tostring(L, -1);
lua_pop(L, 1); // remove error message
}
you must copy the error message before popping the stack. last_error is
a string object which performs the copy.
ps the code is adapted from lauxlib's dofile. Adrian