lua-users home
lua-l archive

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


> Hello All,
>   I am trying to use luaL_loadbuffer instead of luaL_dofile. The reason 
> being I have my own factory system. I load the file then pass the read 
> data to luaL_loadbuffer.
> It returns success code. But when I call the function from that script 
> file. the application exits.What do I have to do to fix this problem.

The functions defined in the script are not defined until the script is run.
So, use luaL_loadbuffer+lua+pcall. Then call whatever function you want.