[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [HELP!] invalid key to 'next'
- From: nr@... (Norman Ramsey)
- Date: Fri, 13 Apr 2007 16:21:23 -0400 (EDT)
I must be doing something very wrong. A large Lua program is failing
in a for loop, and I don't understand why.
The stack trace is:
/usr/local/bin/lua5.1: invalid key to 'next'
[C]: in function '(for generator)'
./assign:961: in function 'elim_nx'
./assign:1131: in function 'go'
./assign:1135: in function 'run'
./assign:1153: in main chunk
Here is a fragment of the source code:
assert(type(rset) == 'table')
for r in pairs(rset) do --- this is line 961
assert(papers[r][pnum], 'reviewed-by and papers are inconsistent')
I don't see how this can possibly be wrong, but evidently the compiler
sees something that I don't. Can anyone suggest what I might do?