lua-users home
lua-l archive

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


yes. Thanks! it does appear that my myfile.lua has a syntax error, because when I replaced that file with another simpler lua file, it seems to go through.
Is there a way to (auto) check on the syntax of a lua file? the lua file I have is "generated" ..
 
cynthia.
On Sun, Nov 1, 2009 at 3:50 PM, Matthew P. Del Buono <delbu9c1@my.erau.edu> wrote:
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