diff --git a/lua.h b/lua.h index 7052f5844..0e54ef320 100644 --- a/lua.h +++ b/lua.h @@ -85,8 +85,11 @@ typedef int luaA_function; if(n) \ lua_insert(L, - (n + 1)); \ if(lua_pcall(L, n, r, 0)) \ + { \ warn("error running function: %s", \ lua_tostring(L, -1)); \ + lua_pop(L, 1); \ + } \ } \ } while(0)