Closed CarlBishop closed 6 years ago
@NewbProgrammer101 Is this from the beds code you added recently?
Indeed it is, checking...
I will check asap and let you know.
Nothing to do, every time someone uses a bed the server goes down
2017-12-21 11:42:09: ACTION[Server]: balin places node lottblocks:bed_bottom_red at (-538,50,-176) 2017-12-21 11:42:09: ACTION[Server]: facedir: 3 2017-12-21 11:42:12: WARNING[Server]: Undeclared global variable "update_formspecs" accessed at ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:47 2017-12-21 11:42:13: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'builtin' in callback on_playerReceiveFields(): ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:47: attempt to call global 'update_formspecs' (a nil value) 2017-12-21 11:42:13: ERROR[Main]: stack traceback: 2017-12-21 11:42:13: ERROR[Main]: ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:47: in function <...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:41> 2017-12-21 11:42:13: ERROR[Main]: /home/peppino/minetest/bin/../builtin/game/register.lua:412: in function </home/peppino/minetest/bin/../builtin/game/register.lua:392>
Try this commit.
@Newbprogrammer101 Try moving the local functions to the front, before it's called.
@peppinoita have you tried out @NewbProgrammer101 's latest changes on his branch? If there's no response soon, I will close the issue and push that fix in, because this have been delayed far too long.
sorry but I do not have time to test the fix.
Dear all.
I'm experiencing the crash every few minutes.
Here the logs:
2017-12-17 23:59:14: ACTION[Server]: reandh3 respawns at (0,16,-1) 2017-12-18 00:00:13: WARNING[Server]: Undeclared global variable "check_in_beds" accessed at ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:31 2017-12-18 00:00:14: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'lottblocks' in callback on_leaveplayer(): ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:31: attempt to call global 'check_in_beds' (a nil value) 2017-12-18 00:00:14: ERROR[Main]: stack traceback: 2017-12-18 00:00:14: ERROR[Main]: ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:31: in function <...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:27> 2017-12-18 00:00:14: ERROR[Main]: /home/peppino/minetest/bin/../builtin/game/register.lua:412: in function </home/peppino/minetest/bin/../builtin/game/register.lua:392>
and also
2017-12-18 00:19:09: ACTION[Server]: BG7 joins game. List of players: BG7 2017-12-18 00:19:47: WARNING[Server]: Undeclared global variable "check_in_beds" accessed at ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:31 2017-12-18 00:19:47: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'lottblocks' in callback on_leaveplayer(): ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:31: attempt to call global 'check_in_beds' (a nil value) 2017-12-18 00:19:47: ERROR[Main]: stack traceback: 2017-12-18 00:19:47: ERROR[Main]: ...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:31: in function <...t/bin/../games/Lord-of-the-Test/mods/lottblocks/beds.lua:27> 2017-12-18 00:19:47: ERROR[Main]: /home/peppino/minetest/bin/../builtin/game/register.lua:412: in function </home/peppino/minetest/bin/../builtin/game/register.lua:392>
Seems happens when someone join the server or respawn.
My enviroment is:
Minetest 0.4.16 (Linux) Using Irrlicht 1.8.3 Build info: VER=0.4.16 BUILD_TYPE=Release RUN_IN_PLACE=1 USE_GETTEXT=0 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=1 STATIC_SHAREDIR="."
I hope this can be usefull to improve the script.