[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem with luaL_loadbuffer
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 15 Oct 2009 15:46:35 -0300
> 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.