water_life/behaviors.lua:511: attempt to compare number with nil #396

Closed
opened 2021-04-05 22:51:36 +00:00 by AliasAlreadyTaken · 3 comments
2021-04-06 00:25:36: ACTION[Server]: OogaBogaBang leaves game. List of players: 
2021-04-06 00:25:51: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'water_life' in callback luaentity_Step(): /home/mtlive1/.minetest/mods/water_life/behaviors.lua:511: attempt to compare number with nil
2021-04-06 00:25:51: ERROR[Main]: stack traceback:
2021-04-06 00:25:51: ERROR[Main]: 	/home/mtlive1/.minetest/mods/water_life/behaviors.lua:511: in function 'func'
2021-04-06 00:25:51: ERROR[Main]: 	/home/mtlive1/.minetest/mods/mobkit/init.lua:621: in function 'execute_queues'
2021-04-06 00:25:51: ERROR[Main]: 	/home/mtlive1/.minetest/mods/mobkit/init.lua:848: in function 'func'
2021-04-06 00:25:51: ERROR[Main]: 	...inetest_live/bin/../builtin/profiler/instrumentation.lua:106: in function <...inetest_live/bin/../builtin/profiler/instrumentation.lua:100>

``` 2021-04-06 00:25:36: ACTION[Server]: OogaBogaBang leaves game. List of players: 2021-04-06 00:25:51: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'water_life' in callback luaentity_Step(): /home/mtlive1/.minetest/mods/water_life/behaviors.lua:511: attempt to compare number with nil 2021-04-06 00:25:51: ERROR[Main]: stack traceback: 2021-04-06 00:25:51: ERROR[Main]: /home/mtlive1/.minetest/mods/water_life/behaviors.lua:511: in function 'func' 2021-04-06 00:25:51: ERROR[Main]: /home/mtlive1/.minetest/mods/mobkit/init.lua:621: in function 'execute_queues' 2021-04-06 00:25:51: ERROR[Main]: /home/mtlive1/.minetest/mods/mobkit/init.lua:848: in function 'func' 2021-04-06 00:25:51: ERROR[Main]: ...inetest_live/bin/../builtin/profiler/instrumentation.lua:106: in function <...inetest_live/bin/../builtin/profiler/instrumentation.lua:100> ```
AliasAlreadyTaken added the
1. kind/bug
2. prio/critical
3. source/mod upstream
labels 2021-04-05 22:51:48 +00:00
Author
Owner

I added

if not dist or not poison or not noob then
                                minetest.log("error","[#396] dist="..dump(dist))
                                minetest.log("error","[#396] poison="..dump(poison))
                                minetest.log("error","[#396] noob="..dump(noob))
                                dist=4
                                poison=0
                                noob=0
                        end

                        if dist > 3 or poison > 0 or noob > 0 then
                                return true
I added ``` if not dist or not poison or not noob then minetest.log("error","[#396] dist="..dump(dist)) minetest.log("error","[#396] poison="..dump(poison)) minetest.log("error","[#396] noob="..dump(noob)) dist=4 poison=0 noob=0 end if dist > 3 or poison > 0 or noob > 0 then return true ```
Author
Owner
https://github.com/berengma/water_life/issues/79
Author
Owner

Fixed in 39d870c548

Fixed in https://github.com/berengma/water_life/commit/39d870c5485a50df816e651a947dd9a6b8e26e36
AliasAlreadyTaken added the
5. result/fixed
label 2021-11-18 02:47:36 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#396
No description provided.