minetest-mods / MoreMesecons

More mesecons items
https://forum.minetest.net/viewtopic.php?f=11&t=13150
Mozilla Public License 2.0
19 stars 12 forks source link

Playerkiller crashing server #9

Closed 9joshua closed 6 years ago

9joshua commented 6 years ago

When the playerkiller is activated my server crashes and Minetest says an internal server error occurred. From the logs...

2018-08-19 19:59:09: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '*builtin*' in callback environment_Step(): ...s/MoreMesecons-master/moremesecons_playerkiller/init.lua:33: attempt to concatenate local 'nearest' (a userdata value)
2018-08-19 19:59:09: ERROR[Main]: stack traceback:
2018-08-19 19:59:09: ERROR[Main]:   ...s/MoreMesecons-master/moremesecons_playerkiller/init.lua:33: in function 'action_on'
2018-08-19 19:59:09: ERROR[Main]:   ...minetest_game/mods/mesecons-master/mesecons/internal.lua:190: in function <...minetest_game/mods/mesecons-master/mesecons/internal.lua:183>
2018-08-19 19:59:09: ERROR[Main]:   ...etest_game/mods/mesecons-master/mesecons/actionqueue.lua:93: in function 'execute'
2018-08-19 19:59:09: ERROR[Main]:   ...etest_game/mods/mesecons-master/mesecons/actionqueue.lua:84: in function <...etest_game/mods/mesecons-master/mesecons/actionqueue.lua:61>
2018-08-19 19:59:09: ERROR[Main]:   /usr/share/games/minetest/builtin/game/register.lua:420: in function </usr/share/games/minetest/builtin/game/register.lua:400>
2018-08-19 19:59:09: ERROR[Main]: stack traceback:
HybridDog commented 6 years ago

paly2, I think there should be nearest:get_player_name(). https://github.com/minetest-mods/MoreMesecons/blob/8a56370ce8efd68d4ca54fde0bd6b5c37d35f601/moremesecons_playerkiller/init.lua#L32-L33 https://github.com/minetest-mods/MoreMesecons/commit/2b19f4a2fca65942b0677c4b6a8a90d01c62c193#diff-3051ac1ea99e03afbe02c1dec38adbe9

paly2 commented 6 years ago

Oh yeah definitely (I don't see how I can have left such an enormous mistake)

9joshua commented 6 years ago

Just confirming this fixed the problem. Thanks for the fast response.