lua-users home
lua-l archive

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

lua_newtable(L) creates a table and puts it on the stack. Then you can use
lua_settable to put stuff into it. Pretty sure this is in the
documentation, since I know it and I haven't perused much of the lua code. 

On Mon, 19 Nov 2001 20:52:36 +0100
"Matthias Gall" <> wrote:

> > Matthias should be pushing a single value (a table), instead of
> > individual values and a count.  Or he could push the multiple values
> I read 5.10 and 5.11 in the manual several times now, but it seems
> 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
> 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
> be the right method, without having created a table somehow.
> Greetings,
> Matt