diff --git a/test3d_t416/init.lua b/test3d_t416/init.lua index a8a88b3..f54cf4b 100644 --- a/test3d_t416/init.lua +++ b/test3d_t416/init.lua @@ -20,7 +20,6 @@ local function t416_digiline_receive(pos, node, channel, msg) local memoffset = meta:get_int("startaddr") if channel:sub(1,#chan) == chan and tonumber(channel:sub(#chan+1),16)+1-memoffset <= MEMSIZE and tonumber(channel:sub(#chan+1),16)+1-memoffset > 0 then local memaddr = tonumber(channel:sub(#chan+1),16)+1-memoffset - print(memaddr) if tostring(msg):lower() == "get" then digiline:receptor_send(pos, digiline.rules.default, channel, tonumber(mem[memaddr] or 0)) print("Reading address "..tostring(memaddr)..": "..tostring(mem[memaddr])) @@ -39,7 +38,7 @@ print("Created T416 digiline function") local function t416_set_meta(pos) local meta = minetest.get_meta(pos) local ms = "" - for i = 1, 16 do + for i = 1, MEMSIZE do ms = ms .. "0\n" end meta:set_string("mem",ms)