Grass_1 Protection Bug...
When trying to place default:grass_1 near a protection block the server shuts down... It does this every time and brings up the following error:
I've had to edit the /usr/share/minetest/games/minetest_game/mods/farming/init.lua file and comment out lines 208 to 213 so it wont happen on our server...
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
09:50:28: ERROR[main]: ERROR: An unhandled exception occurred: ...e/minetest/games/minetest_game/mods/farming/init.lua:212: attempt to index local 'ret' (a nil value)
09:50:28: ERROR[main]: stack traceback:
09:50:28: ERROR[main]: ...e/minetest/games/minetest_game/mods/farming/init.lua:212: in function <...e/minetest/games/minetest_game/mods/farming/init.lua:208>
In thread b6cea700:
/build/buildd/minetestc55-201403250546/src/main.cpp:1875: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD b3cffb40:
#0 virtual void* CurlFetchThread::Thread()
DEBUG STACK FOR THREAD b6cea700:
#0 int main(int, char**)
(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void Database_SQLite3::saveBlock(MapBlock*))
(Leftover data: #4 void ItemStack::serialize(std::ostream&) const)
Aborted
I've had to edit the /usr/share/minetest/games/minetest_game/mods/farming/init.lua file and comment out lines 208 to 213 so it wont happen on our server...
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
-- on_place = function(itemstack, placer, pointed_thing)
-- -- place a random grass node
-- local stack = ItemStack("default:grass_"..math.random(1,5))
-- local ret = minetest.item_place(stack, placer, pointed_thing)
-- return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
-- end,