DHUD for 10.0 and Classic/Cata

DHUD for 10.0 and Classic/Cata

298k Downloads

Retail 10.2.7 - Bad Argument

Zenjir0 opened this issue ยท 3 comments

commented

I think recent changes caused the addon to break.

Here is the bug report that is generated.

32x DHUD/gui/GUIFrames.lua:471: bad argument #1 to 'SetJustifyV' (Usage: self:SetJustifyV(justifyV))
[string "=[C]"]: in function `SetJustifyV'
[string "@DHUD/gui/GUIFrames.lua"]:471: in function `createTextFontString'
[string "@DHUD/gui/GUIFrames.lua"]:510: in function `createTextFrame'
[string "@DHUD/gui/GUIFrames.lua"]:2094: in function `createFrames'
[string "@DHUD/gui/GUIFrames.lua"]:2197: in function `init'
[string "@DHUD/DHUD_Main.lua"]:161: in function `main'
[string "@DHUD/DHUD_Main.lua"]:173: in function `func'
[string "@DHUD/DHUD_LibClasses.lua"]:68: in function <DHUD/DHUD_LibClasses.lua:68>

Locals:
(*temporary) = DHUD_Left_TextBig1_textField {
 0 = <userdata>
 fontName = "Interface\AddOns\DHUD\art\Number.TTF"
}
(*temporary) = "CENTER"
commented

Addon has been updated so I am closing ticket.

commented

Thanks to this I found simple fix, just comment out line 471 in DHUD/gui/GUIFrames.lua file, simply put all you need to do is add "--" in front of "textField:SetJustifyV(alignV);" like this "-- textField:SetJustifyV(alignV);" and hit save, enjoy!

commented

After some more digging I found out cause of the problem in lua canges "The FontInstance:SetJustifyH and FontInstance:SetJustifyV functions now more strictly validate inputs and will no longer permit "MIDDLE" to be used for horizontal justification, or "CENTER" for vertical."

so in DHUD for vertical and horizontal align "CENTER" was used but now for vertical it needs to be "MIDDLE"..
after changing to "MIDDLE" in all the right places everything works again without the need to "comment out" line 471