Loading...

[INSTALLER] Custom Text Issue

1
Version of ElvUI (use /estatus command ingame to check): 12.05

Attempting to import my profile into the installer and hitting a snag with the Custom Texts. This is an old profile that works in 12.05, however I am not sure if there were some modifications that might have broke my profile for the installer.

Here is the error I am getting

Code: Select all

Message: Interface\AddOns\NoobTacoUI\Code.lua:272: attempt to index field '?' (a nil value)
Time: Wed Oct 21 08:47:31 2020
Count: 2
Stack: Interface\AddOns\NoobTacoUI\Code.lua:272: attempt to index field '?' (a nil value)
[string "=[C]"]: ?
[string "@Interface\AddOns\NoobTacoUI\Code.lua"]:272: in function <Interface\AddOns\NoobTacoUI\Code.lua:27>
[string "@Interface\AddOns\NoobTacoUI\Code.lua"]:767: in function <Interface\AddOns\NoobTacoUI\Code.lua:767>

Locals: 
Here is the gist of my code.lua. I have commented out the other custom text fields while testing.

https://gist.github.com/NoobTaco/9f9d97 ... 1dc7d485a8

Do I need to rebuild this profile from scratch or is there a line of code I need to add?

Thank you.

[INSTALLER] Custom Text Issue

2
You need to make it a table

Code: Select all

	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"] = {} -- Added Line
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["attachTextTo"] = "Health"
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["xOffset"] = 0
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["text_format"] = "[name:medium]"
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["yOffset"] = 0
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["font"] = "Montserrat-Bold"
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["justifyH"] = "CENTER"
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["fontOutline"] = "NONE"
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["enable"] = false
	E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"]["size"] = 14

[INSTALLER] Custom Text Issue

3
Thanks Az. I tried to use that simplified method and it was still giving me errors. I did manage to get a work around, ugly as it is, by adding the if statement like this for each customText section

Code: Select all

	-- Target of Target Unit Frame
	if not E.db.unitframe.units.targettarget.customTexts then E.db.unitframe.units.targettarget.customTexts = {} end
	if E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"] == nil then
		E.db["unitframe"]["units"]["targettarget"]["customTexts"]["TargetTargetName"] = {}
	end
That works now but I have run into another issue where my action bars are not being changed and moved.

Here is my updated Code.lua

https://gist.github.com/NoobTaco/9f9d97 ... 1dc7d485a8