lua-users home
lua-l archive

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


> > Matthias should be pushing a single value (a table), instead of multiple
> > individual values and a count.  Or he could push the multiple values and
> 
> I read 5.10 and 5.11 in the manual several times now, but it seems there's
> nothing about creating a table from the C API! lua_settable works with a
> "table that resides somewhere in the stack", and requires a key pushed onto
> the stack - what key (I just want to return a random number of numerical
> values from my C function to the LUA script)? lua_rawseti does not seem to
> be the right method, without having created a table somehow.

Hi,

In section 5.10 :-)

"Finally, the function void lua_newtable (lua_State *L);
creates a new, empty table and pushes it onto the stack."

[]s,
Diego.