Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with hunger_ng and damage off setting #30

Open
daretmavi opened this issue Nov 14, 2020 · 0 comments
Open

Error with hunger_ng and damage off setting #30

daretmavi opened this issue Nov 14, 2020 · 0 comments

Comments

@daretmavi
Copy link

If you use hunger_ng and try to print, while damage is off, then you get this error:

2020-11-09 17:52:22: WARNING[Server]: +m tried to use hunger_ng.get_hunger_information() but Hunger NG is disabled because damage is disabled.
2020-11-09 17:52:22: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '' in callback environment_Step(): ...etest/games/a-planet-alive/mods/player/hbsprint/init.lua:234: attempt to index a nil value
2020-11-09 17:52:22: ERROR[Main]: stack traceback:
2020-11-09 17:52:22: ERROR[Main]:   ...etest/games/a-planet-alive/mods/player/hbsprint/init.lua:234: in function 'sprint_step'
2020-11-09 17:52:22: ERROR[Main]:   ...etest/games/a-planet-alive/mods/player/hbsprint/init.lua:257: in function <...etest/games/a-planet-alive/mods/player/hbsprint/init.lua:253>
2020-11-09 17:52:22: ERROR[Main]:   /home/thomas/git/minetest/bin/../builtin/game/register.lua:435: in function </home/thomas/git/minetest/bin/../builtin/game/register.lua:419>
2020-11-09 17:52:22: ERROR[Main]: stack traceback:
2020-11-09 17:52:22: WARNING[Server]: +m tried to use hunger_ng.get_hunger_information() but Hunger NG is disabled because damage is disabled.

Possible repair is to change init.lua (line 233)
elseif starve == "hunger_ng" then
to
elseif starve == "hunger_ng" and minetest.is_yes(minetest.settings:get('enable_damage')) then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant