lua-users home
lua-l archive

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


--- Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:

> > When running exactly the same test with the same
> data over and over, I
> > keep getting different results, usually with a
> message that says
> > "attempt to index field '?' (a nil value)", in
> different places in my
> > code.
> 
> you're probably doing something like a[x][y] and
> a[x] is nil.
> check the line number in the error message.

I did check the line number in the error message, and
the data is fine when I look at it with ldb.

In any event, with exactly the same input data and
exactly the same code, how can I get different results
on successive runs? Could I have an uninitialized
variable? I didn't think that was possible in Lua,
unlike in C or C++.