[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: simple question about lua<-->C
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 11 Mar 2009 22:19:39 -0300
> > luaL_loadfile( m_hPrivateState, "teste.lua" );
>
> You need to lua_pcall the chunk returned by luaL_loadfile here.
Or use luaL_dofile instead of luaL_loadfile, which does luaL_loadfile+lua_pcall.
Be sure to check the return code in case there are errors in the file (either
syntax errors or execution errors).