[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [5.1.4/newbie] "attempt to index ... 'file' (a nil value)"?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 18 Feb 2011 10:26:25 -0200
> BTW, is there a tool that can parse a Lua script to spot syntax errors?
luac -p
But that [w vs. "w"] issue is not a syntax error.
> As this script is called by a C program, when there's a bug, it's
> difficult to tell if the error is compile-time or run-time, as it just
> returns non-zero.
Use luaL_loadfile+lua_pcall instead of luaL_dofile.