Page 1 of 1

bucket.register

PostPosted: Fri Mar 30, 2012 20:29
by bgsmithjr
I get this error when trying to register a new luquid.

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"
)

PostPosted: Fri Mar 30, 2012 20:34
by sfan5
Somehing is wrong with the Buket API

PostPosted: Fri Mar 30, 2012 20:37
by bgsmithjr
Thanks.

PostPosted: Fri Mar 30, 2012 21:56
by kahrl
Do you have bucket in depends.txt?

PostPosted: Fri Mar 30, 2012 22:10
by sdzen
yes i had that error when i didnt use a depends

PostPosted: Fri Mar 30, 2012 22:25
by ray8888
i did to