# HG changeset patch # User James D. Callahan III # Date 1341435671 18000 # Node ID 059341095e99bd6147b66a0a1d67e9b23836f1a2 # Parent 63f7286e5d133fbcfa2137d1848259f418842cb3 Apparently in MoP it is not possible for InstanceType in GetInstanceInfo() to return nil. diff -r 63f7286e5d13 -r 059341095e99 Main.lua --- a/Main.lua Tue Jul 03 20:25:17 2012 -0500 +++ b/Main.lua Wed Jul 04 16:01:11 2012 -0500 @@ -125,9 +125,13 @@ local function InstanceDifficultyToken() local _, instance_type, instance_difficulty, difficulty_name, _, _, is_dynamic = _G.GetInstanceInfo() - if difficulty_name == "" then + if not difficulty_name or difficulty_name == "" then difficulty_name = "NONE" end + + if not instance_type or instance_type == "" then + instance_type = "NONE" + end return ("%s:%s:%s"):format(instance_type:upper(), difficulty_name:upper():gsub(" ", "_"), _G.tostring(is_dynamic)) end