lua-users home
lua-l archive

Re: [5.1.4/newbie] "attempt to index ... 'file' (a nil value)"?

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


On 18 February 2011 19:32, Steve Litt <slitt@troubleshooters.com> wrote:
> This is wonderful. It's like "use strict" for Lua. However, I had a problem
> with your code because k was always a table, regardless of the global I read
> or wrote (I also added a __newindex() to catch writes to globals). So I
> changed your code to add a v to the __index() and __newindex() args, and it
> seems now to do what you intended:
See also http://lua-users.org/wiki/DetectingUndefinedVariables
Alex

AltStyle によって変換されたページ (->オリジナル) /