lua-users home
lua-l archive

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


cynthia powers wrote:
> Hi,
> 
> I am very new to lua. and I am trying a c-calling-lua setup. I get an error
> : status = 3(LUA_ERRSYNTAX) to the luaL_dofile call below. WHat am I doing
> wrong? Any help is appreciated.
> 
> int run_lua_block ()
> {
>     lua_State *L;
>     L = lua_open();
>     openlualibs(L);
>     registerMyFunction (L);
>     lua_settop (L,0);
>     int status = luaL_dofile (L, "myfile.lua");
>     lua_close(L);
>     return status;
> }
> 
> 
> Thanks
> cynthia.
> 
Your myfile.lua has a syntax error?

======

Matthew P. Del Buono