[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Problems loading a lua function in c
- From: Simen Haugen <simen.haugen@...>
- Date: Fri, 24 Mar 2006 21:12:58 +0100 (CET)
Thanks a lot. It solved my problems.
The manual is not very clear on that subject (that you have to call lua_pcall after loading a file). I cant find that information in the reference manual.
On Fri, 24 Mar 2006 15:47 , Luiz Henrique de Figueiredo <firstname.lastname@example.org> sent:
This appears to the be #1 FAQ lately: lua_loadfile loads but *does not*
execute a Lua program. Use luaL_dofile instead. Perhaps this needs to be
clear in the manual.
In your case, call lua_pcall before lua_getfield and all will be well.