luk3yx / minetest-cloaking

Allows players to go invisible in Minetest!
MIT License
4 stars 3 forks source link

Error when invoking cloaking.get_connected_players() #8

Closed hlqkj closed 3 years ago

hlqkj commented 3 years ago

Hi, I got the following error a few times by now, hope you can help in understanding what's going wrong:

2021-08-20 11:51:00: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'under_sky' in callback environment_Step(): ...home/minetest/minetest/bin/../mods/cloaking/core.lua:350: wrong number of arguments to 'insert'
2021-08-20 11:51:00: ERROR[Main]: stack traceback:
2021-08-20 11:51:00: ERROR[Main]:       [C]: in function 'insert'
2021-08-20 11:51:00: ERROR[Main]:       ...home/minetest/minetest/bin/../mods/cloaking/core.lua:350: in function 'get_connected_players'
2021-08-20 11:51:00: ERROR[Main]:       ...ome/minetest/minetest/bin/../mods/under_sky/init.lua:38: in function 'func'
2021-08-20 11:51:00: ERROR[Main]:       ...minetest/bin/../builtin/profiler/instrumentation.lua:106: in function '?'
2021-08-20 11:51:00: ERROR[Main]:       ...e/minetest/minetest/bin/../builtin/game/register.lua:422: in function <...e/minetest/minetest/bin/../builtin/game/register.lua:406>

Some context. The under_sky mod used there is a fork of mine, you can see it here. Basically I just tried to add support for cloaked players to it, by replacing calls to minetest.get_connected_players() with the corresponding API provided by cloaking. This seems to fail sometimes, that is when a cloaked players leaves the game.

Thanks in advance for any help you can give :)

luk3yx commented 3 years ago

I've tried to fix this in https://github.com/luk3yx/minetest-cloaking/commit/6e454df37c8adb41e5eb5498904aa1536b75962e, if it crashes again please reopen this issue. Thanks for reporting this.

hlqkj commented 3 years ago

That was quick! I just pulled and can't seem to reproduce anymore, will see in the next few days. Thank you so much!