fco guildinfo error with pchat, specific to pchat with no configuration |
Bug #: |
3756 |
File: |
FCO GuildInfo |
Date: |
09/05/21 01:59 AM |
By: |
EnigmaniteZ |
Status: |
Fixed
|
user:/AddOns/FCOGuildInfo/FCOGuildInfo.lua:386: attempt to index a nil value
stack traceback:
user:/AddOns/FCOGuildInfo/FCOGuildInfo.lua:386: in function 'FCOGuildInfo:buildGuildMemberOnlineText'
|caaaaaa<Locals> self = [table:1]{__isAbstractClass = F}, buildType = "label", chatOutputText = "", numGuilds = 2, guildIndex = 1, guildId = 399657, guildIdRemoved = 399657, displayName = "@Kherae", pChatUseESOcolors = F </Locals>|r
user:/AddOns/FCOGuildInfo/FCOGuildInfo.lua:263: in function 'FCOGuildInfo:Initialize'
|caaaaaa<Locals> self = [table:1], control = ud, numGuilds = 2, icon = ud, label = ud, anchorControl = ud </Locals>|r
user:/AddOns/FCOGuildInfo/FCOGuildInfo.lua:89: in function 'FCOGuildInfo:New'
|caaaaaa<Locals> self = [table:1], control = ud, object = [table:2]{}, guild = [table:3]{} </Locals>|r
user:/AddOns/FCOGuildInfo/FCOGuildInfo.lua:652: in function 'OnAddOnLoaded'
|caaaaaa<Locals> event = 65536, addonName = "FCOGuildInfo" </Locals>|r
relevant lines of code:
if pChat then
pChatUseESOcolors = PCHAT_OPTS.Default[displayName]["$AccountWide"].useESOcolors or false
end
after testing, I found that it is due to Default being nil. Why? well, it helps to know that I have configured NOTHING about pchat. at all. so, debugging:
where local a=PCHAT_OPTS:
|caaaaaa<Locals> self = [table:1]{__isAbstractClass = F}, buildType = "label", chatOutputText = "", numGuilds = 2, guildIndex = 1, guildId = 399657, guildIdRemoved = 399657, displayName = "@Kherae", pChatUseESOcolors = F, a = [table:2]{} </Locals>|r
this is saying that the saved variables for pchat are completely empty. Given that I have no configured pchat at all, this is not unexpected.
my suggestion is to verify that PCHAT_OPTS.Default exists before attempting to index it, of course. |
|