lua-users home
lua-l archive

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


L-28C wrote:
>> But running it will be a different matter, esp. since you're not
>> initializing any of the Lua libraries [i.e. no output functions are
>> available to your Lua script!].
> luaL_openlibs(L);
> 
> That did the trick. :-)
> 
>> Eh, I don't even want to ask, but are you using bin2c on C code?
> I am a noob, but not of THAT magnitude! xD
> 
> 
> Now, I don't think a new thread deserves this, so I'll ask here. How do
> you pass arguments to the bin2c'd script?
> 
> Thank you all!
> 
> 
> 
Simple push arguments on the stack, and set the number of argument in
lua_pcall. you can use ... to retrieve the arguments inside the script :

arg1, arg2, arg3 = ...



-- 
--
Julien Hamaide
Engineering Coach
10Tacle Studios Belgium / Elsewhere Entertainment