From 28f4d28c8c87e89d0c4f851bdd2ce2a58449397d Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Thu, 2 Nov 2017 19:05:08 +0000 Subject: [PATCH] fixed problem in rank give --- locale/ExpGaming-Core/ExpGaming - Rank Control.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua index 32c12b5d..a424b9d1 100644 --- a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua +++ b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua @@ -72,6 +72,7 @@ function ranking.rank_print(msg, rank, inv) end --Give the user their new rank and raise the Event.rank_change event function ranking.give_rank(player,rank,by_player,tick) + if not player or not player.valid then return end local tick = tick or game.tick local by_player = by_player or 'server' local rank = ranking.string_to_rank(rank) or rank or ranking.string_to_rank_group('User').lowest_rank @@ -194,5 +195,5 @@ Event.register(Event.soft_init,function() end) Event.register(defines.events.on_player_joined_game,function(event) ranking.find_new_rank(game.players[event.player_index]) end) Event.register(Event.soft_init,function() global.exp_core.preset_ranks = {} end) ---Please Only Edit Above This Line----------------------------------------------------------- + return ranking \ No newline at end of file