From 9309233c895551e690e6efc196819ab392297af1 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 14 Oct 2018 18:09:17 +0100 Subject: [PATCH] Small Changes --- modules/ExpGamingCore/Gui/src/left.lua | 3 ++- modules/ExpGamingCore/Role/control.lua | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ExpGamingCore/Gui/src/left.lua b/modules/ExpGamingCore/Gui/src/left.lua index 0452836a..eb9a1a82 100644 --- a/modules/ExpGamingCore/Gui/src/left.lua +++ b/modules/ExpGamingCore/Gui/src/left.lua @@ -215,7 +215,8 @@ left.on_player_joined_game = function(event) -- draws the left guis when a player first joins, fake_event is just because i am lazy local player = Game.get_player(event) local frames = Gui.data.left or {} - if not mod_gui.get_frame_flow(player)['gui-left-hide'] then left.hide(mod_gui.get_frame_flow(player)).style.maximal_width=15 end + local left_flow = mod_gui.get_frame_flow(player) + if not left_flow['gui-left-hide'] then left.hide(left_flow).style.maximal_width=15 end local done = {} for _,name in pairs(order_config) do local left = Gui.data.left[name] diff --git a/modules/ExpGamingCore/Role/control.lua b/modules/ExpGamingCore/Role/control.lua index 644ea30d..ba2b6f01 100644 --- a/modules/ExpGamingCore/Role/control.lua +++ b/modules/ExpGamingCore/Role/control.lua @@ -119,6 +119,7 @@ end function Role.assign(player,role,by_player,batch) local player = Game.get_player(player) if not player then error('Invalid player #1 given to Role.assign.',2) return end + if not role then return end -- this loops over a table of role if given; will return if ipairs returns, else will asume it was ment to be a role and error if is_type(role,'table') and not role.name then local ctn = 0