From e93f27e379efa62e6f440a27d0694f7197ca193a Mon Sep 17 00:00:00 2001 From: Vladislav Tsendrovskii Date: Sun, 31 Oct 2021 14:43:48 +0300 Subject: [PATCH] Fix warnings --- mods/lord/lord_classes/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/lord/lord_classes/init.lua b/mods/lord/lord_classes/init.lua index 764efd47e..800dbc546 100644 --- a/mods/lord/lord_classes/init.lua +++ b/mods/lord/lord_classes/init.lua @@ -369,7 +369,7 @@ function races.update_privileges(name, old_granted_privs, old_revoked_privs, end end end - + if new_revoked_privs then for _, priv_name in ipairs(new_revoked_privs) do privs[priv_name] = nil @@ -689,12 +689,12 @@ minetest.register_chatcommand("give_chance", { -- Check if player exists -- TODO: handle case of logged out player - local name = args[1] - if not races.player_is_known(name) then - return false, string.format(SL("Player '%s' does not exist"), name) + local username = args[1] + if not races.player_is_known(username) then + return false, string.format(SL("Player '%s' does not exist"), username) end - races.grant_second_chance(name) + races.grant_second_chance(username) end })