From ab04ac5b4c2d5fc83f9a88720757cd17edf08a94 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Sun, 18 Nov 2018 13:19:41 +0100 Subject: [PATCH] fixed dual use of same variable name 'target' in custom_commands.lua:jail --- features/custom_commands.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/custom_commands.lua b/features/custom_commands.lua index bfb1c6dc..0ca7c8d0 100644 --- a/features/custom_commands.lua +++ b/features/custom_commands.lua @@ -482,12 +482,12 @@ local function jail_player(cmd) return end -- Check if the target is valid - local target = cmd['parameter'] - if target == nil then + local target_name = cmd['parameter'] + if not target then Game.player_print('Usage: /jail ') return end - local target = game.players[cmd['parameter']] + local target = game.players[target_name] Report.jail(target, player) end