[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: Gilles Ganault <gilles.ganault@...>
- Date: Fri, 18 Feb 2011 13:18:13 +0100
On Fri, 18 Feb 2011 09:56:57 -0200, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>Try
> local file = io.open ('/var/tmp/myfile.txt',"w")
Thanks guys, it works now. I didn't notice that mode had to be quoted.
BTW, is there a tool that can parse a Lua script to spot syntax
errors?
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.
Thank you.