Loading...

Attempt to index field 'field here' (a nil value)

#1
Trying to set up my installer. Get an error message " Interface\AddOns\NIMBY\Code.lua:76: attempt to index field 'movers' (a nil value)"

Code: Select all

E.db["movers"]["TopCenterContainerMover"] = "TOP,ElvUIParent,TOP,0,-59"
is the line of code. The rest of my code can be found at https://drive.google.com/file/d/1FmMQHF ... sp=sharing. I've done the install for ElvUI but did not choose any of the options. What I'm trying to do is make sure everything is at a default before trying to add my settings. I don't affect all of the available options for each item in ElvUI so using a basic blank slate would be ideal.

Attempt to index field 'field here' (a nil value)

#4
Custom Texts have the same issue. Not because of ElvUI install getting ignored though.
Example of Custom Text on Player:

Code: Select all

if not E.db.unitframe.units.player.customTexts then E.db.unitframe.units.player.customTexts = {} end
and

Code: Select all

if E.db["unitframe"]["units"]["player"]["customTexts"]["YourCustomTextName"] == nil then
	E.db["unitframe"]["units"]["player"]["customTexts"]["YourCustomTextName"] = {}
end
Everything I do is guareanteed 100% miskrake free

Attempt to index field 'field here' (a nil value)

#5
Good to know. Thank you. I just realized that

Code: Select all

E.data:ResetProfile()
would actually work as long as I use the line

Code: Select all

if E.db["movers"] == nil then E.db["movers"] = {} end
afterwards. Is there a way to use

Code: Select all

E.data:ResetProfile()
without the popup? The popup asks if you want to reset the profile. Hitting Yes gives me the desired effect, but I'd rather not have user see the popup at all.

Who is online

Users browsing this forum: No registered users and 1 guest