My guess is that line 204: "local l_above = minetest.env:get_node_light({x = pos.x,y=pos.y+2,z=pos.z}, nil)" is returning nil because that pos wasn't generated or loaded from disk yet.
It should be noted that any of the minetest.env functions could return nil for unloaded mapblocks. For most mods you don't need to worry about it, but it is possible and should be checked for. Of course, I say that knowing I haven't.
Last edited by randomproof on Thu Jan 19, 2012 22:56, edited 1 time in total.
randomproof wrote:My guess is that line 204: "local l_above = minetest.env:get_node_light({x = pos.x,y=pos.y+2,z=pos.z}, nil)" is returning nil because that pos wasn't generated or loaded from disk yet.
It should be noted that any of the minetest.env functions could return nil for unloaded mapblocks. For most mods you don't need to worry about it, but it is possible and should be checked for. Of course, I say that knowing I haven't.
Okay, I'm busy for now(a lot of work), but I will fix it in some weeks or apply the patch if somebody do that. Also problems about mod should be posted in %modname% thread.
randomproof wrote:My guess is that line 204: "local l_above = minetest.env:get_node_light({x = pos.x,y=pos.y+2,z=pos.z}, nil)" is returning nil because that pos wasn't generated or loaded from disk yet.
It should be noted that any of the minetest.env functions could return nil for unloaded mapblocks. For most mods you don't need to worry about it, but it is possible and should be checked for. Of course, I say that knowing I haven't.
Okay, I'm busy for now(a lot of work), but I will fix it in some weeks or apply the patch if somebody do that. Also problems about mod should be posted in %modname% thread.
I tried to fix it ... here my update into mushroom/init.lua file
just be sure to test for nil value .. line 220 and 238