PDA

View Full Version : AddOn not showing up


Beelzer
02-03-2007, 07:10 AM
I used the XML tutorial at top and my mod isn't showing up in the addons list, nor is doing anything, here is my code...
Interface
## Interface : 20003
## Name : Simple
## Notes : A very simple add-on.
## Author : Anthei
Simple.xml

lua
function Simple_ButtonClick()
DEFAULT_CHAT_FRAME:AddMessage(Simple_EditBox:GetTe xt());
Simple_EditBox:SetText("");
end

function Simple_Close()
SimpleFrame:Hide();
end

XML
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">

<Script file="Simple.lua"/>

<Frame name="SimpleFrame" parent="UIParent" visible="true">
<Size>
<AbsDimension x="200" y="133" />
</Size>
</Frame>

<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Frame>

<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackg round"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5"/>
</BackgroundInsets>
</Backdrop>

</Frame>

<Layers>
<Layer level="ARTWORK">
<FontString name="Simple_Text" inherits="ChatFontNormal" text="Type in something:">
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-33"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>

<Frames>
<Button name="Simple_CloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-3" y="-3" />
</Offset>
</Anchor>
</Anchors>

<Scripts>
<OnClick>Simple_Close();</OnClick>
</Scripts>
</Button>

<EditBox name="Simple_EditBox" letters="50">
<Layers>
<Layer level="BACKGROUND">
<Texture name="Simple_Background">
<Color r=".2" g=".2" b=".2" a="1"/>
</Texture>
</Layer>
</Layers>
<Size>
<AbsDimension x="190" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="5" y="-66"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnEnterPressed>
Simple_AcceptButton:Click();
</OnEnterPressed>
</Scripts>
<FontString inherits="ChatFontNormal"/>
</EditBox>

<Button name="Simple_AcceptButton" inherits="OptionsButtonTemplate" text="GO!">
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="20"/>
</Offset>
</Anchor>
</Anchors>

<Scripts>
<OnClick>Simple_ButtonClick();</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>

</Ui>

Kassie
02-03-2007, 08:01 AM
Changing "Name" to "Title" in the .TOC file will get it to show up in the list so you can enable it to work in-game.

Jumpy
02-03-2007, 08:04 AM
Well, on just a quick look, in your XML you have too many </Frame> statements. For each <Frame> you should only have one </Frame>. I counted one <Frame> statement and five </Frame> statements. If there is an error in your XML you will not see any error message when you start up the game. The addon, if placed in the right folder, will show in the addons list but it won't work. So if you don't see your addon in the addon list it is in the wrong folder or you have named the folder and the .toc, .lua or .xml files incorrectly.

A handy way to debug XML is to open it with Firefox which will tell you what errors it has found. Do this over and over again until Firefox shows no errors.