2023-04-26 19:25:14: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'default' in callback environment_Step(): ...netest-5.7.0/bin/../mods/castle_gates/gate_functions.lua:441: attempt to index a nil value
2023-04-26 19:25:14: ERROR[Main]: stack traceback:
2023-04-26 19:25:14: ERROR[Main]: ...netest-5.7.0/bin/../mods/castle_gates/gate_functions.lua:441: in function 'func'
2023-04-26 19:25:14: ERROR[Main]: .../minetest/minetest-5.7.0/bin/../builtin/common/after.lua:20: in function <.../minetest/minetest-5.7.0/bin/../builtin/common/after.lua:5>
2023-04-26 19:25:14: ERROR[Main]: ...minetest/minetest-5.7.0/bin/../builtin/game/register.lua:446: in function <...minetest/minetest-5.7.0/bin/../builtin/game/register.lua:432>
and a second crash
2023-04-27 20:18:12: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'castle_gates' in callback item_OnPlace(): ...ik/mt-server/bin/../mods/castle_gates/gate_functions.lua:217: attempt to index local 'adjacent_def' (a nil value)
2023-04-27 20:18:12: ERROR[Main]: stack traceback:
2023-04-27 20:18:12: ERROR[Main]: ...ik/mt-server/bin/../mods/castle_gates/gate_functions.lua:217: in function 'get_door_layout'
2023-04-27 20:18:12: ERROR[Main]: ...ik/mt-server/bin/../mods/castle_gates/gate_functions.lua:375: in function 'on_rightclick'
2023-04-27 20:18:12: ERROR[Main]: /home/nik/mt-server/bin/../builtin/game/item.lua:313: in function </home/nik/mt-server/bin/../builtin/game/item.lua:306>
Fixes https://github.com/Archtec-io/bugtracker/issues/33 and https://github.com/minetest-mods/castle_gates/issues/17
and a second crash