aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/lua_api/common.cpp7
-rw-r--r--src/shared/lua_api/common.hpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/shared/lua_api/common.cpp b/src/shared/lua_api/common.cpp
index 57d1db0..1ee4b72 100644
--- a/src/shared/lua_api/common.cpp
+++ b/src/shared/lua_api/common.cpp
@@ -261,10 +261,11 @@ int errfunc(lua_State *L){
lua_pop(L, 2);
return 1;
}
- lua_pushvalue(L, -4); //error,{debug},print,debug.traceback,error
+ //lua_pushvalue(L, -4); //error,{debug},print,debug.traceback,error
//lua_pushinteger(L, 3); //error,{debug},print,debug.traceback,error,2
- lua_call(L, 2, 1);//error,{debug},print,str_traceback
- printf("Error:%s\n",lua_tostring(L,-1));
+ lua_call(L, 0, 1);
+ //lua_call(L, 2, 1);//error,{debug},print,str_traceback
+ printf("--------------------------\n");
lua_call(L,1,0);//error,{debug}
lua_pop(L,1);
printf("Returning");
diff --git a/src/shared/lua_api/common.hpp b/src/shared/lua_api/common.hpp
index 583ab1e..ba89521 100644
--- a/src/shared/lua_api/common.hpp
+++ b/src/shared/lua_api/common.hpp
@@ -23,4 +23,6 @@ int popvector2i(lua_State*,long*,long*);
int poprecti(lua_State* L,long*,long*,long*,long*);
int pushrecti(lua_State* L,long,long,long,long);
+
+void pusherrorfunc(lua_State *L);
#endif