lua-users home
lua-l archive

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


[Paul Bleisch]
> Can someone explain what is wrong with this code?
[...]
> lua_beginblock();
> while ((i = lua_next(Table, i)) != 0) {
> c++;
> }
> lua_endblock();

You have to wrap each lua call into begin/endblock. Something like:

lua_beginblock();
while ((i = lua_next(Table, i)) != 0) {
    lua_endblock();
    lua_beginblock();
 c++;
}
lua_endblock();´

Peter