[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The attempt to call a nil value problem
- From: Alexander Gladysh <agladysh@...>
- Date: Mon, 6 Sep 2010 12:10:31 +0400
> I don t know exactly but in my experience it is strongly probable that
> you forgot to declare the variable as local and lua is binding it to
> the enclosing scope. This kind of problem can be hard to spot because
> is some cases the program can actually work when you debug it at the
> beginning.
One way to do it is to grep bytecode dumps for GETGLOBAL and SETGLOBAL.
See here: http://lua-users.org/wiki/DetectingUndefinedVariables
Alexander.