From 97e3eb6c86cf422ee14e11628924195771d1d2d7 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 4 Nov 2018 15:32:03 +0000 Subject: [PATCH] Fixed command validation player-rank-alive --- modules/ExpGamingCore/Role/src/commands.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ExpGamingCore/Role/src/commands.lua b/modules/ExpGamingCore/Role/src/commands.lua index a67bfe4b..158b32b8 100644 --- a/modules/ExpGamingCore/Role/src/commands.lua +++ b/modules/ExpGamingCore/Role/src/commands.lua @@ -3,7 +3,7 @@ local Role = self commands.add_validation('player-rank',function(value,event) local player,err = commands.validate['player'](value) if err then return commands.error(err) end - local rtn = Role.get_highest(player).index > Role.get_highest(event.player_index).index and player or nil + local rtn = Role.get_highest(player).index > Role.get_highest(event).index and player or nil if not rtn then return commands.error{'ExpGamingCore_Command.error-player-rank'} end return rtn end) @@ -18,7 +18,7 @@ end) commands.add_validation('player-rank-alive',function(value,event) local player,err = commands.validate['player-alive'](value) if err then return commands.error(err) end - local player,err = commands.validate['player-rank'](player) + local player,err = commands.validate['player-rank'](player,event) if err then return commands.error(err) end return player end)