Hey all,
This question bases on FCOChatTabBrain version 0.2.1b!
I've added an option to color the chat tab header text (the text shown at the chat tabs as the "description", like "Combat", "Guilds", "Chat", "New tab" whatever you specify it to be in the chat tab options) with this light blue color (like shown at the whisper messages already), if you are not currently using this chat tab and a message arrives at this tab.
For me this is working pretty well without any errors. Some other players, until today only 2, got an lua error messge if a new chat message arrives and the source code is trying to colorize the chat tab:
Code:
EsoUI/Libraries/Utility/ZO_TabButtonGroup.lua:571: attempt to index a nil value
stack traceback:
EsoUI/Libraries/Utility/ZO_TabButtonGroup.lua:571: in function
'ZO_TabButton_Text_SetTextColor'
user:/AddOns/FCOChatTabBrain/FCOChatTabBrain.lua:4553: in function 'func'
EsoUI/Libraries/Globals/globalapi.lua:181 in function '(anonymous)'
I'm using the standard ZOs function to color the chat tab, like they do it with the whisper messages:
'ZO_TabButton_Text_SetTextColor(tabControl, colorConstant)'
If I check the sources of ZOs file ZO_TabButtonGroup.lua, line 571, where the error appears:
They are just using GetControl(tabControl, "Text") to get the Text label of the tab and then they use this to change the color of the text.
I've implemented the same check inside my source code to see if the Text control is not NIL, and I even checked if the tab itsself is not equal NIL, if the color code exists.
I've added a zo_callLater with some ms to see if this will help.
Everytime I, personally, won't get any error message and the colorizing just works as intended!
-> The 2 other players still get this error message and I don't know why :-(
If any1 is interested in tracking this down or got an idea how to prevent this, or just finds out WHY this happens, I'd be really glad to get informed.
Thank you very much.