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

runtime error #20

Open
ValkyrieStella opened this issue Jan 6, 2020 · 4 comments
Open

runtime error #20

ValkyrieStella opened this issue Jan 6, 2020 · 4 comments

Comments

@ValkyrieStella
Copy link

ValkyrieStella commented Jan 6, 2020

I have been experiencing runtime errors on minetest 5.2 with the latest hbsprint mod:

2020-01-06 13:06:24: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'hbsprint' in callback environment_Step(): .../minetest/bin/../worlds/swue/worldmods/hbsprint/init.lua:105: attempt to index field 'tiles' (a nil value)
2020-01-06 13:06:24: ERROR[Main]: stack traceback:
2020-01-06 13:06:24: ERROR[Main]:       .../minetest/bin/../worlds/swue/worldmods/hbsprint/init.lua:105: in function 'create_particles'
2020-01-06 13:06:24: ERROR[Main]:       .../minetest/bin/../worlds/swue/worldmods/hbsprint/init.lua:192: in function <.../minetest/bin/../worlds/swue/worldmods/hbsprint/init.lua:144>
2020-01-06 13:06:24: ERROR[Main]:       /home/mt/minetest/bin/../builtin/game/register.lua:429: in function </home/mt/minetest/bin/../builtin/game/register.lua:413>
2020-01-06 13:06:24: ERROR[Main]: stack traceback:

EDIT by SmallJoker: Use three backticks for multiline code.

@SmallJoker
Copy link
Member

SmallJoker commented Jan 7, 2020

Please check for updates. There is no tiles in L105.

hbsprint/init.lua

Lines 103 to 107 in 2547242

if starve == "hbhunger" then
local hunger = tonumber(hbhunger.hunger[name]) - starve_drain
hbhunger.hunger[name] = math.max(0, hunger)
hbhunger.set_hunger_raw(player)
elseif starve == "hunger_ng" then

EDIT: If that does not fix your issue, try to change this line

local tile = def.tiles[1] or def.inventory_image

to
local tile = def.tiles and def.tiles[1] or def.inventory_image

@verymilan
Copy link

ftr my server ran into this at L134 now... didn't try suggested changes yet

@ghost
Copy link

ghost commented Feb 18, 2021

Same Crash in my server:

2021-02-18 00:49:27: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '' in callback environment_Step(): /home/minetest/minetest/bin/../mods/hbsprint/init.lua:134: attempt to index field 'tiles' (a nil value)
2021-02-18 00:49:27: ERROR[Main]: stack traceback:
2021-02-18 00:49:27: ERROR[Main]: /home/minetest/minetest/bin/../mods/hbsprint/init.lua:134: in function 'create_particles'
2021-02-18 00:49:27: ERROR[Main]: /home/minetest/minetest/bin/../mods/hbsprint/init.lua:246: in function 'sprint_step'
2021-02-18 00:49:27: ERROR[Main]: /home/minetest/minetest/bin/../mods/hbsprint/init.lua:257: in function </home/minetest/minetest/bin/../mods/hbsprint/init.lua:253>
2021-02-18 00:49:27: ERROR[Main]: /home/minetest/minetest/bin/../builtin/game/register.lua:426: in function </home/minetest/minetest/bin/../builtin/game/register.lua:410>

  • Minetest Version: 5.4-dev

  • hbsprint mod update to last commit: 1fe580a

@SmallJoker
Copy link
Member

@NathanielFreeman Should be fixed in f566d0f. Please report back if there are any similar/new issues in this regard.

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

3 participants