You want to call ZO_ColorDef.FromInterfaceColor instead of ZO_ColorDef:FromInterfaceColor as this is the definition:
Code:
function ZO_ColorDef.FromInterfaceColor(colorType, fieldValue)
return ZO_ColorDef:New(GetInterfaceColor(colorType, fieldValue))
end
edit: too slow...
Originally Posted by Enodoc
Anyone able to assist with the cause of a couple of UI Errors?
Code:
Checking type on argument interfaceColorType failed in GetInterfaceColor_lua
stack traceback:
[C]: in function 'GetInterfaceColor'
EsoUI/Libraries/Utility/ZO_ColorDef.lua:46: in function 'ZO_ColorDef.FromInterfaceColor'
user:/AddOns/CyrodiilAlert/CyrodiilAlert.lua:134: in function 'CA.Initialise'
This is line 134:
Lua Code:
CA.colGrn = ZO_ColorDef:FromInterfaceColor(INTERFACE_COLOR_TYPE_KEEP_TOOLTIP,KEEP_TOOLTIP_COLOR_ACCESSIBLE)
Code:
user:/AddOns/CyrodiilAlert/CyrodiilAlert.lua:210: attempt to index a nil value
stack traceback:
user:/AddOns/CyrodiilAlert/CyrodiilAlert.lua:210: in function 'CA.InitKeeps'
EsoUI/Libraries/Globals/globalapi.lua:195: in function '(anonymous)'
This is line 210:
Lua Code:
local initText = zo_strformat(CA.colOng:Colorize(GetString(SI_CYRODIIL_ALERT_INIT_TEXT)))
I haven't changed these lines for months and as far as I can remember it was all working fine on PTS. Based on the ESOUI Wiki, line 134 should be fine, as ZO_ColorDef:FromInterfaceColor still exists, as do the constants INTERFACE_COLOR_TYPE_KEEP_TOOLTIP and KEEP_TOOLTIP_COLOR_ACCESSIBLE, and I don't know what is nil in 210 as CA.colOng is defined in line 138 as
Lua Code:
CA.colOng = ZO_ColorDef:New(0.84,0.4,0.05,1)
and the string SI_CYRODIIL_ALERT_INIT_TEXT is defined in my lang file:
Lua Code:
ZO_CreateStringId("SI_CYRODIIL_ALERT_INIT_TEXT", "Cyrodiil Alert Initialized")
Any insight would be greatly appreciated!
Thanks
|