lua-users home
lua-l archive

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

On 9/13/07, Luiz Henrique de Figueiredo <> wrote:
> > It was not in my code snippet but luaL_openlibs(L) is done after
> > creating the state (I patched luaL_newstate()) so that isn't the
> > cause.
> Could you please then show us the complete code?

Well, there isn't much else to show, it's just this.

lua_State* L = luaL_newstate();
luaL_openlibs(L);  -- although this happens inside luaL_newstate()
if (luaL_dofile(L, "strict.lua")) {
 printf("failed to load strict.lua: %s\n", lua_tostring(L, -1));

This is all plain Lua so I have no clue why this is going wrong. I'm
loading some other .lua files in the same way after strict.lua and
those work (if I remove the loading of strict.lua).