lua-users home
lua-l archive

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


On Feb 14, 2014, at 7:40 AM, Thijs Schreijer <thijs@thijsschreijer.nl> wrote:

> 
> Btw is it possible to pass parameters to lua code loaded with luaL_loadstring?
> 
> Thijs

lua_loadstring() leaves a Lua function on the stack (at the top) .. you can then call this function using lua_call() or lua_pcall() .. look at the docs for these functions to see how you pass parameters and get back return values (hint: you push them onto the stack).

—Tim