Can someone help me with the fuel-to-energy-generator?
I am trying to simply create a 1x1 chest you can put fuel in (Or transfer it via pipes);
I'm getting this error when placing the node:
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:18:28: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: /home/florian/.minetest/usermods/oil/init.lua:536: attempt to call method 'inventory_set_list' (a nil value)
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("oil:generator", {
tile_images = {"default_lava.png"},
paramtype = "facedir_simple",
metadata_name = "generic",
material = minetest.digprop_stonelike(3.0),
})
minetest.register_on_placenode(function(pos, newnode, placer)
if newnode.name == "oil:generator" then
local meta = minetest.env:get_meta(pos)
meta:inventory_set_list("0", {""}) -- THIS LINE SEEMS TO CAUSE THE ERROR
meta:set_inventory_draw_spec(
"invsize[8,9;]list[current_name;0;4,4;1,1;]"
.."list[current_player;main;0,5;8,4;]"
)
end
end)
Can someone tell me why this doesn't work??? Seems like it cannot get the meta or something like that.
Anyway, Morechests mod works on with the same minetest version and I can't really see any difference.
Are you missing the whole code? Just past the code above behind the oil mod if you want to help finding the bug.
-----------------
Preview looks promising, sfan5!