Open wziard opened 5 years ago
Change to
self.object:set_velocity({x=0,y=0,z=0})
This seemed to help for a bit, but now the same crash is back (with this fix applied).
The fix doesn't match the error message btw. Because the error complains that set_velocity itself is a nil value, so no matter what params you pass it it'll crash.
@wziard I tested the change locally and right-clicking the turtle works fine now. In this case you did not apply the change correctly or you're using a somewhat outdated Minetest version (< 0.4.16).
Oh, my bad. I made a mistake applying your fix. It seems to work now.
I'm still a bit confused, as the crash happens when nobody is right-clicking the turtle. It looks like it happend each time just after the last player disconnected.
But anyway, this indeed seems to fix it.
Should this fix not rather be in the code here?
@jubalh Good luck. blert2112 was last seen in 2016.
2018-11-24 11:59:57: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_turtles' in callback luaentity_run_simple_callback(): /.minetest/mods/mobs_water/mobs_turtles/init.lua:54: attempt to call global 'set_velocity' (a nil value) 2018-11-24 11:59:57: ERROR[Main]: stack traceback: 2018-11-24 11:59:57: ERROR[Main]: .minetest/mods/mobs_water/mobs_turtles/init.lua:54: in function <.minetest/mods/mobs_water/mobs_turtles/init.lua:52>