From e008dbdf20fef856e27c7ca6d429354f70f1ad3f Mon Sep 17 00:00:00 2001 From: TalkLounge Date: Mon, 11 Oct 2021 20:25:50 +0200 Subject: [PATCH] Fix nil value issue --- playerlist.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playerlist.lua b/playerlist.lua index a23b02d..2ec145c 100644 --- a/playerlist.lua +++ b/playerlist.lua @@ -7,7 +7,7 @@ controls.register_on_press(function(player, key) for i, p in pairs(players) do local n = p:get_player_name() local info = minetest.get_player_information(n) - if info then + if info and info.avg_rtt then local ping = math.max(1, math.ceil(4 - info.avg_rtt * 4)) list[#list + 1] = player:hud_add({ hud_elem_type = "text", -- 2.44.0