lua-users home
lua-l archive

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



The function became this:

int thefunc(lua_State *L)
{
    lua_newtable(L);

     // check parameters ...

     for(int i = 1; i <= someValue; i++){

       ...
       lua_pushstring(L, someString);
       lua_rawseti(L, i, -1);
     }
     return 1;
}
Much better!

Almost! Try:

	lua_rawseti(L, -2, i)

[;-)]

Ashwin.
--
no signature is a signature.