lua-users home
lua-l archive

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


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.

-Simen

On Fri, 24 Mar 2006 15:47 , Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> 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.
--lhf