summaryrefslogtreecommitdiffstats
path: root/source/LuaCommandBinder.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-14 01:34:47 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-14 01:34:47 +0200
commit41ba1a7642105ac21b67f4febac3eceef6a39f0a (patch)
treeaec9b8bfcde7f1ad44e2cb28149a41a091f60465 /source/LuaCommandBinder.cpp
parentBetter split of the fluid simulator functionality; removed the old LavaSimulator and WaterSimulator files. (diff)
downloadcuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.gz
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.bz2
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.lz
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.xz
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.tar.zst
cuberite-41ba1a7642105ac21b67f4febac3eceef6a39f0a.zip
Diffstat (limited to 'source/LuaCommandBinder.cpp')
-rw-r--r--source/LuaCommandBinder.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/LuaCommandBinder.cpp b/source/LuaCommandBinder.cpp
index 7a65cab7f..75c738124 100644
--- a/source/LuaCommandBinder.cpp
+++ b/source/LuaCommandBinder.cpp
@@ -4,7 +4,6 @@
#include "LuaCommandBinder.h"
#include "Player.h"
#include "Plugin.h"
-#include "Plugin_Lua.h"
#include "tolua++.h"
@@ -12,7 +11,18 @@
-extern bool report_errors(lua_State* lua, int status);
+bool report_errors(lua_State* lua, int status)
+{
+ if ( status!=0 )
+ {
+ std::string s = lua_tostring(lua, -1);
+ LOGERROR("-- %s", s.c_str() );
+ lua_pop(lua, 1);
+ return true;
+ }
+ return false;
+}
+
cLuaCommandBinder::cLuaCommandBinder()
{