ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Cannot understand why "attempt to index a nil value" is appearing (https://www.esoui.com/forums/showthread.php?t=10254)

RainyDays 07/03/22 06:43 PM

Cannot understand why "attempt to index a nil value" is appearing
 
I am using the OblivionStyleHUD add-on which has been causing my game to hang when I try to logout to select a different character. I'm trying to figure it out and the only noticeable issue I have with the addon is this error message upon login:

Code:

user/AddOns/OblivionStyleHUD/Prettyadditions.lua:24: attempt to index a nil value
<Locals> MyTexture = ud, MyTexture = ud, MyTexture = ud, MyTexture = ud, </Locals>

At 24:

MyTexture:SetDimensions(1330,75)

Here's the full chunk of code there:

Lua Code:
  1. local MyTexture = WINDOW_MANAGER:CreateControl("Inventory4", ZO_QuickSlot, CT_TEXTURE)  
  2. MyTexture:SetDimensions(1330,75)
  3. MyTexture:SetAnchor(TOPLEFT, ZO_StatsPanelTitleSection, TOPLEFT, -15, 30)
  4. MyTexture:SetTexture("/OblivionStyleHud/media/details/inv_tab3.dds")

I found the functions in LibAddonMenu-2.0 and I looked at the texture list documentation and things appear to be accurate? I can't understand why it's popping the error and my research led me here. I don't know if that can be the cause of my game freezing upon logout, but it's worth a shot to fix that anyway. Thank you :)

Baertram 07/04/22 01:13 AM

ZO_QuickSlot does not exist any longer thus the texture MyTexture that wants to be added to it cannot find it and cannot be created -> the texture MyTexture will be nil in the end and thus the error tells you that something will index (find an attribute or variable) of a nil table (MyTexture).
With High isle the Quickslots were changed and now you got QUICKSLOT_KEYBOARD instead, and the control of the quickslots is QUICKSLOT_KEYBOARD.control I think.


All times are GMT -6. The time now is 01:57 PM.

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