Thanks big time for the help, but now I get
ERROR[Main]: ...netest-0.4.13-98d16e0-win64\bin\..\mods\testing\init.lua:9: unexpected symbol near ','
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_abm(
{nodenames = {"default:dirt"},
interval = 5,
chance = 10,
action = function(pos)
local airpos = minetest.find_node_near({x = pos.x, y = pos.y +1, z = pos.z}, 1, {"default:air"})
if airpos==true then
minetest.set_node(airpos, {name="default:sand"})
end,
})