Thread Tools Display Modes
08/16/17, 05:12 PM   #41
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Originally Posted by ZOS_DanBatson View Post
I see the issue, I'll look into it. Thanks for the detailed info!
Cool! Glad I could help
  Reply With Quote
08/16/17, 05:16 PM   #42
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
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 View Post
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:
  1. 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:
  1. 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:
  1. 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:
  1. ZO_CreateStringId("SI_CYRODIIL_ALERT_INIT_TEXT", "Cyrodiil Alert Initialized")

Any insight would be greatly appreciated!

Thanks
  Reply With Quote
08/16/17, 05:26 PM   #43
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Two of us helping Shinni is only a good thing
  Reply With Quote
08/16/17, 05:38 PM   #44
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
@Weolo @Shinni Thanks guys, that seems to have sorted it! Strange that it was never an issue before...
  Reply With Quote
08/17/17, 12:55 AM   #45
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,567
Originally Posted by Enodoc View Post
@Weolo @Shinni Thanks guys, that seems to have sorted it! Strange that it was never an issue before...
The function definition was changed in the first PTS release.
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » 3.1 Update

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off