lua-users home
lua-l archive

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


Hallo,

Jacek Popławski wrote:
I need following function:

	targetBoosts=GetTargetBoosts(skill)

GetTargetBoost will be defined in engine
targetBoost will be table (list) of numbers
I know how to push number in C api, I know how to set elements of table in C
api, but how to push table?


lua_newtable(lua_State*) creates a new table and pushes it onto the stack. If the table is already created at a known index, you can use lua_pushvalue(lua_State*m, int index).

-alex