Thread Tools Display Modes
07/03/22, 06:43 PM   #1
RainyDays
Join Date: Jul 2022
Posts: 1
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
  Reply With Quote
07/04/22, 01:13 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
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.

Last edited by Baertram : 07/04/22 at 01:15 AM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Cannot understand why "attempt to index a nil value" is appearing

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