1. I want to get stuff from another file in my addon, right now I have 2 files that have some of the same codes in it. What I want to do is make 1 file and put the stuff that both of the file uses in that file. How would I do that?

    I would also like to change the font color in a lua script, not xml. Right now the code is:

    LUA

     CustomQuest_Header:SetTextColor(r=000/255, g=255/255, b=000/255)
    
     QuestDifficultyColors["header"].font = CustomQuest_Header;
    

    XML

    <Font name="CustomQuest_Header"/>

    I tried the color code above and I get this:

     Message: ...nterface\AddOns\DetailDisplayer\InterfaceEditing.lua:17: attempt to index global 'CustomQuest_Header' (a nil value)
     Time: 04/27/11 02:03:27
     Count: 1
     Stack: ...nterface\AddOns\DetailDisplayer\InterfaceEditing.lua:17: in main chunk
    
     Locals: (*temporary) = nil
     (*temporary) = nil
     (*temporary) = <userdata>
     (*temporary) = nil
     (*temporary) = nil
     (*temporary) = nil
     (*temporary) = "attempt to index global 'CustomQuest_Header' (a nil value)"
    
  2. If you create the font in XML, you need to define the parameters in XML. A font is not a global object, so you can't just manipulate it. Just use the :SetFont() method on the font string you are trying to change. Alternatively, define the font in XML and then use it.

    You are not meant to be changing the colors of fonts once they are defined. If you have a font string that needs to change colors, use color codes.