This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Elephant caused an error when loading:
1x Elephant\Initialize.lua:49: bad argument #1 to 'sub' (string expected, got nil) [C]: in function `sub' Elephant\Initialize.lua:49: in function <Elephant\Initialize.lua:45> Elephant\Initialize.lua:90: in function <Elephant\Initialize.lua:65> (tail call): ? [C]: ? [string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5> (tail call): ? ...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0-12.lua:558: in function `EnableAddon' ...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0-12.lua:651: in function <...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0.lua:636> [C]: in function `LoadAddOn' FrameXML\UIParent.lua:353: in function `UIParentLoadAddOn' FrameXML\UIParent.lua:424: in function `TimeManager_LoadUI' FrameXML\UIParent.lua:693: in function <FrameXML\UIParent.lua:658>
I am not sure how shall I submit an PR to fix the issue, thus I put the patch here:
diff --git a/Core.lua b/Core.lua index e07a842..e3151cf 100644 --- a/Core.lua +++ b/Core.lua @@ -1,6 +1,7 @@ --[[ Creating AddOn ]] Elephant = LibStub("AceAddon-3.0"):NewAddon("Elephant", "AceConsole-3.0", "AceEvent-3.0") Elephant.L = LibStub("AceLocale-3.0"):GetLocale("Elephant") +Elephant.IsClassic = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC) --[[ Bindings ]] BINDING_HEADER_ELEPHANT = "Elephant" diff --git a/Initialize.lua b/Initialize.lua index d763cc8..f413d69 100644 --- a/Initialize.lua +++ b/Initialize.lua @@ -86,10 +86,12 @@ function Elephant:OnEnable() ElephantFrameRaidTabButton, Elephant.L['chatnames']['raid'], 'RAID') + if not Elephant.IsClassic then SetTabButtonProperties( ElephantFrameInstanceTabButton, Elephant.L['chatnames']['instance'], 'INSTANCE_CHAT') + end SetTabButtonProperties( ElephantFrameSayTabButton, Elephant.L['chatnames']['say'],
Tried it in WoW Classic and works pretty well, thank you.
PS: If you dislike the name "INSTANCE" in the tooltip of the chat bubble in Elephant, just edit the ["instance"] value in the
corresponding Locale-LUA of your language.
L['chatnames'] = {... ['instance'] = INSTANCE}
Will update in version 1.13.3d-classic+
To post a comment, please login or register a new account.