lua-users home
lua-l archive

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


> >
> >     int result = luaL_dofile(L, "frame.lua");
> >
> 
>      You should first load you script, and then run it with
> lua_pcall(). This way you can catch errors and report them.

That's what luaL_dofile does. If result is  not 0, then the error message
is at the top of the stack and can b retrieved with lua_tostring(L,-1).
--lhf