WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   SetFont error (https://www.wowinterface.com/forums/showthread.php?t=59480)

Walkerbo 01-21-23 05:21 PM

SetFont error
 
Hi all
I am the author of NewbDevBox and have an issue that has reared its ugly head with the launch of Ulduar in Wrath classic.

I keep getting the following error;
Lua Code:
  1. 13x Interface/AddOns/NewbDevBox/NewbDevBox.lua:110: Usage: self:SetFont(fontFile, height, flags)
  2. [string "=[C]"]: in function `SetFont'
  3. [string "@Interface/AddOns/NewbDevBox/NewbDevBox.lua"]:110: in main chunk
  4.  
  5. Locals:
  6. (*temporary) = NewbDevBoxTitle {
  7. 0 = <userdata>
  8. }
  9. (*temporary) = "NewbDevBox\Files\OCRAStd.otf"
  10. (*temporary) = 32
But when I check my code where I define my font object I can not see the error.
Here is my font definition;
Lua Code:
  1. NewbDevBoxInterfaceFrame.TitleBox = CreateFrame("Frame", "NewbDevBoxInterfaceFrameTitleBox", NewbDevBoxInterfaceFrame)
  2. NewbDevBoxInterfaceFrame.TitleBox:SetSize(NumberList.titleFrameWidth, NumberList.titleFrameHeight)
  3. NewbDevBoxInterfaceFrame.TitleBox:SetPoint("TOP", NewbDevBoxInterfaceFrame, 0, NumberList.titleFrameGap)
  4. NewbDevBoxInterfaceFrame.TitleBox.Text =
  5.     NewbDevBoxInterfaceFrame.TitleBox:CreateFontString("NewbDevBoxInterfaceFrameTitleBoxText")
  6. NewbDevBoxInterfaceFrame.TitleBox.Text:SetAllPoints(NewbDevBoxInterfaceFrameTitleBox)
  7. NewbDevBoxInterfaceFrame.TitleBox.Text:SetFontObject(NewbDevBoxTitle)
  8. NewbDevBoxInterfaceFrame.TitleBox.Text:SetText(TextStringList.interfaceTitle)

I am really stumped here, after 2 days of trying to fix this bug I am still not close to understanding where or what my error is.

Here is a link to my code on paste bin.

Can anyone help me in identifying my bug and how to fix it?

Yes, I am aware of the irony that the name of the addon is NewbDevBox, but I named it that way because I am the newb. :)

Walkerbo 01-21-23 06:58 PM

Hi all

I made a bone head error and was looking at the wrong file.

So please ignore this thread.


All times are GMT -6. The time now is 05:49 PM.

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