The difference to pilzAdams clean mod is, that it fetches the unknown nodes from a txt file (each line contains 1 node) and uses a abm
It worked great in Minetest 0.4.14 but it stopped working in some dev version.
Code: Select all
-- Clean mod 2.1
--
-- (c) 2016 King Arthurs Team
local old_nodes = {}
local MODNAME = minetest.get_current_modname()
local MODPATH = minetest.get_modpath(MODNAME)
local file = MODPATH..DIR_DELIM.."unknown-nodes.txt"
for node_name in io.lines(file) do
table.insert(old_nodes, node_name:trim())
end
minetest.register_lbm({
name = MODNAME..":old_nodes",
nodenames = old_nodes,
-- ^ List of node names to trigger the LBM on.
-- Also non-registered nodes will work.
-- Groups (as of group:groupname) will work as well.
run_at_every_load = true,
-- ^ Whether to run the LBM's action every time a block gets loaded,
-- and not just for blocks that were saved last time before LBMs were
-- introduced to the world.
action = minetest.remove_node
})
The error message I get is the following:
Code: Select all
2016-11-06 10:43:09: ERROR[Main]: ModError: Failed to load and run script from ...\init.lua:
2016-11-06 10:43:09: ERROR[Main]: .../clean.lua:10: attempt to call a nil value
2016-11-06 10:43:09: ERROR[Main]: stack traceback:
2016-11-06 10:43:09: ERROR[Main]: .../clean.lua:10: in main chunk
2016-11-06 10:43:09: ERROR[Main]: Check debug.txt for details.
Got the io.lines() removed for some reason? How to re-add the function?