ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   3.1 Update (https://www.esoui.com/forums/showthread.php?t=7212)

Weolo 08/16/17 05:12 PM

Quote:

Originally Posted by ZOS_DanBatson (Post 32331)
I see the issue, I'll look into it. Thanks for the detailed info!

Cool! :cool: Glad I could help

Shinni 08/16/17 05:16 PM

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...

Quote:

Originally Posted by Enodoc (Post 32330)
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 :)


Weolo 08/16/17 05:26 PM

Two of us helping Shinni is only a good thing :)

Enodoc 08/16/17 05:38 PM

@Weolo @Shinni Thanks guys, that seems to have sorted it! Strange that it was never an issue before...

sirinsidiator 08/17/17 12:55 AM

Quote:

Originally Posted by Enodoc (Post 32336)
@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.


All times are GMT -6. The time now is 02:38 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI