summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-07 21:28:32 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-07 21:28:32 +0200
commit499962029a94074ecd007a1be5f760337ff9ffbb (patch)
treec084157866783cc18ef8c9844e0ee09edf38a7b7 /MCServer
parentFixed bug in entities movement: Corrected proper flooring of double values for the relative move packet, and teleport packet. Also, made the velocity packet to be sent first than the positions packets. (diff)
downloadcuberite-499962029a94074ecd007a1be5f760337ff9ffbb.tar
cuberite-499962029a94074ecd007a1be5f760337ff9ffbb.tar.gz
cuberite-499962029a94074ecd007a1be5f760337ff9ffbb.tar.bz2
cuberite-499962029a94074ecd007a1be5f760337ff9ffbb.tar.lz
cuberite-499962029a94074ecd007a1be5f760337ff9ffbb.tar.xz
cuberite-499962029a94074ecd007a1be5f760337ff9ffbb.tar.zst
cuberite-499962029a94074ecd007a1be5f760337ff9ffbb.zip
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index d3d70b98c..c1c0e1fe6 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -54,6 +54,7 @@ function Initialize(Plugin)
f:write(n, "\n");
end
f:close();
+ LOG("API.txt written.");
end
@@ -136,6 +137,35 @@ function Initialize(Plugin)
end
+ -- Debug SQLite binding
+ local TestDB, ErrCode, ErrMsg = sqlite3.open("test.sqlite");
+ if (TestDB ~= nil) then
+ local function ShowRow(UserData, NumCols, Values, Names)
+ assert(UserData == 'UserData');
+ LOG("New row");
+ for i = 1, NumCols do
+ LOG(" " .. Names[i] .. " = " .. Values[i]);
+ end
+ return 0;
+ end
+ local sql = [=[
+ CREATE TABLE numbers(num1,num2,str);
+ INSERT INTO numbers VALUES(1, 11, "ABC");
+ INSERT INTO numbers VALUES(2, 22, "DEF");
+ INSERT INTO numbers VALUES(3, 33, "UVW");
+ INSERT INTO numbers VALUES(4, 44, "XYZ");
+ SELECT * FROM numbers;
+ ]=]
+ local Res = TestDB:exec(sql, ShowRow, 'UserData');
+ if (Res ~= sqlite3.OK) then
+ LOG("TestDB:exec() failed: " .. Res .. " (" .. TestDB:errmsg() .. ")");
+ end;
+ TestDB:close();
+ else
+ -- This happens if for example SQLite cannot open the file (eg. a folder with the same name exists)
+ LOG("SQLite3 failed to open DB! (" .. ErrCode .. ", " .. ErrMsg ..")");
+ end
+
return true
end