Cannot see errors in lua file when using Wax in Swift
lsoaresesilva opened this issue · 1 comments
lsoaresesilva commented
wax_runLuaFile does not print any error found on lua script. I' have made a change in the source to look like this:
int wax_runLuaFile(const char *script){
[wax_globalLock() lock];
int i = luaL_dofile(wax_currentLuaState(), script);
if( i != 0 )
fprintf(stderr,"Error opening wax scripts: %s\n", lua_tostring(wax_currentLuaState(),-1));
[wax_globalLock() unlock];
return i;
}
and now I can see the errors.
dourgulf commented
Yes, I think it's necessary to print the error, not only this function but also other 2 wax_runXXX function.