[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to load more than a file from C
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 30 Apr 2014 15:07:48 +0200
On Wed, Apr 30, 2014 at 2:29 PM, Thijs Schreijer
<thijs@thijsschreijer.nl> wrote:
> On what line do you get that? On my system it works as expected. But because you do it embedded; have you opened the standard libraries? I suspect that the 'print' function is not available.
Oh yes! I did that recently, went mad briefly until the "d'oh" moment.
But is the error coming from the script? Usually you'd do something
like (error checking omitted)
lua_getglobal(L,"fun_x");
lua_pcall(L,0,0,0);
And that could blow up if Lua can't find fun_x. That can happen if
you load the script, but forget to call the returned chunk - since
only then are the functions actually created.