[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: "Invalid key for 'next'" error
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 13 Oct 2005 11:13:30 -0300
> So my question is: why am I getting this error?
Good question :) It seems that a key is misteriosly disapearing from
your table while you traverse it.
Can you instrument your program to collect the two last key in the loop,
so that when the error occurs you can know which key is missing and
which key led to it? Then, after the error, you could check whether
"next(t, k1)" is actually k2 and whether k2 is absent from t.
(That table is not weak, is it?)
(Are you sure LuaPlus has nothing to do with the problem?)