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
20:28:35: ERROR[main]: ========== ERROR FROM LUA ===========
20:28:35: ERROR[main]: Failed to load and run script from
20:28:35: ERROR[main]: /home/ubuntu/Desktop/celeron55-minetest-94f1ab4/bin/../mods/mesetint/morewater/init.lua:
20:28:35: ERROR[main]: ...test-94f1ab4/bin/../mods/mesetint/morewater/init.lua:23: attempt to index global 'bucket' (a nil value)
20:28:35: ERROR[main]: stack traceback:
20:28:35: ERROR[main]: ...test-94f1ab4/bin/../mods/mesetint/morewater/init.lua:23: in main chunk
20:28:35: ERROR[main]: =======END OF ERROR FROM LUA ========
So then I copied the function from bucket.lua and it gives the same error.
my code
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_node("morewater:water_source", {
description = "Water",
inventory_image = minetest.inventorycube("default_water.png"),
drawtype = "liquid",
tile_images = {"default_water.png"},
alpha = WATER_ALPHA,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "default:water_flowing",
liquid_alternative_source = "morewater:water_source",
liquid_viscosity = WATER_VISC,
post_effect_color = {a=64, r=100, g=100, b=200},
special_materials = {
-- New-style water source material (mostly unused)
{image="default_water.png", backface_culling=false},
},
groups = {water=3, liquid=3},
})
bucket.register_liquid(
"morewater:water_source",
"default:water_flowing",
"morewater:water_source",
"bucket_water.png"
)