Sokomine / cottages

Minetest mod for building medieval houses
GNU General Public License v3.0
15 stars 20 forks source link

Anvil crashes game #21

Closed Anonymous3-a closed 1 year ago

Anonymous3-a commented 1 year ago

When I use the anvil, the game crashes (presumably when the anvil repair overlay should get removed). I'm gonna look through the code and find the part that does that, so I can submit a pull request (that is, if I can fix it).

Side note: I got this from the mod on the Minetest content database, so if it's out of date, please tell me

fluxionary commented 1 year ago

possibly related to #18

fluxionary commented 1 year ago

@Anonymous3-a what do you mean crashes? can you post the stack trace (the full error message). even a screenshot would be useful.

Anonymous3-a commented 1 year ago

@fluxionary Here:

AsyncErr: Lua: Runtime error from mod 'cottages' in callback environment_Step(): /home/frank/.minetest/mods/cottages/nodes_anvil.lua:233: bad argument #1 to 'hud_remove' (number expected, got nil)
stack traceback:
    [C]: in function 'hud_remove'
    /home/frank/.minetest/mods/cottages/nodes_anvil.lua:233: in function 'func'
    /usr/share/minetest/builtin/common/after.lua:20: in function </usr/share/minetest/builtin/common/after.lua:5>
    /usr/share/minetest/builtin/game/register.lua:431: in function </usr/share/minetest/builtin/game/register.lua:417>
Anonymous3-a commented 1 year ago

Also, #18 is also the same problem as far as I can tell.

fluxionary commented 1 year ago

@Anonymous3-a i'm pretty sure i know the source if this, i'll try to create a PR tomorrow

Anonymous3-a commented 1 year ago

@fluxionary Ok, thanks!