Update init.lua, qrencode.lua

master
Tobias Gaarenstroom 2021-12-18 17:34:26 +00:00
parent 04e7b27b16
commit 021c08d27e
2 changed files with 1 additions and 3 deletions

View File

@ -12,7 +12,7 @@ local function matrix_to_string(tab)
str_tab[y + 1][x + 1] = "1"
elseif tab[x][y] < 0 then
str_tab[y + 1][x + 1] = "0"
else
else
str_tab[y + 1][x + 1] = " "
str_tab[y + 1][x + 2] = "1"
end
@ -47,7 +47,6 @@ minetest.register_chatcommand("qrcode", {
print('Something went wrong')
else
local rows = matrix_to_string(tab_or_message)
local string
for x=1,#rows do
for z=1,#rows do
if rows[x][z] == "1" then

View File

@ -178,7 +178,6 @@ end
-- See table 2 of the spec. We only support mode 1, 2 and 4.
-- That is: numeric, alaphnumeric and binary.
local function get_mode( str )
local mode
if string.match(str,"^[0-9]+$") then
return 1
elseif string.match(str,"^[0-9A-Z $%%*./:+-]+$") then