lua-users home
lua-l archive

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

Hi Cynthia,

If you show us the code you have written, the output, and the expected output, it would be easier to see what's wrong.

Note that if you change the table you're iterating on while you're iterating, it will cause problems.

Christian Tellefsen

cynthia powers wrote:
lua newbie question:
I have a lua-calling c setup. I have a c function called in a while loop from lua. This function accesses a global array and is supposed to return the next member of the array in each call. The first call to the function from the lua side works ok, I notice that in the subsequent calls, it points to incorret locations. Has anyone seen something similar before? Any suggestions to fix this? The same function in a c-calling c setup works ok. Thanks