lua-users home
lua-l archive

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


phil@flamewars.org wrote:
> 
> Sorry, that should have been like this:
> 
> if (luaL_loadfile(L, filename) != 0)
> {
>         // Error occurred
>         cout << "Error occurred: " << lua_tostring(L, -1);
> }
> 
> --

I /think/ luaL_loadfile leaves a nil and an error string 
on the stack in case of error, so maybe it will work when 
you change the -1 to -2 ? 

-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be