Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot see errors in lua file when using Wax in Swift #57

Open
lsoaresesilva opened this issue May 1, 2017 · 1 comment
Open

Cannot see errors in lua file when using Wax in Swift #57

lsoaresesilva opened this issue May 1, 2017 · 1 comment

Comments

@lsoaresesilva
Copy link

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
Copy link

Yes, I think it's necessary to print the error, not only this function but also other 2 wax_runXXX function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants