From c649177a327374d8c68c34df331f32089d8870e7 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Fri, 4 Jun 2021 16:51:39 +0200 Subject: [PATCH] Fixed birthright descriptions causing errors when using other languages --- eid_modifiers.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eid_modifiers.lua b/eid_modifiers.lua index b75aa4a5..84aaa8fc 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -6,7 +6,8 @@ if REPENTANCE then end local function BirthrightCallback(descObj) local playerID = EID.player.SubType + 1 - local birthrightDesc = EID.descriptions[EID.Config["Language"]]["birthright"][playerID] or EID.descriptions["en_us"]["birthright"][playerID] or nil + local translatedDesc = EID.descriptions[EID.Config["Language"]]["birthright"] + local birthrightDesc = (translatedDesc and translatedDesc[playerID]) or EID.descriptions["en_us"]["birthright"][playerID] or nil if birthrightDesc ~=nil then local playerName = birthrightDesc[1] or EID.player:GetName() descObj.Description = "{{CustomTransformation}} {{ColorGray}}"..playerName.."{{CR}}#"..birthrightDesc[3]