魔兽世界附加XML错误

时间:2013-12-09 00:27:14

标签: xml lua add-on world-of-warcraft

我正在努力学习如何开始制作魔兽世界的附加组件。我试图按照“魔兽世界编程”第1版的书,但似乎事情已经发生了变化。我正在尝试将XML设置为只在屏幕上显示没有Lua的东西。我找不到错误,任何帮助都会很棒!

<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/
..\FrameXML\UI.xsd">

    <Script File="GD_Guild.lua"/>

    <Button name="GD_GuildFrame" parent="UIParent" enableMouse="true"
movable="true" frameStrata="LOW">
        <Size x="175 y="40"/>

        <Anchors>
            <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="Minimap">
                <Offset x="-30" y="-30"/>
            </Anchor>
        </Anchors>

        <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" title="true">
            <BackgroundInsets>
                <AbsInset left="11" right="12" top="12" bottom="11"/>
            </BackgroundInsets>

            <TileSize>
                <AbsValue val="32"/>
            </TileSize>

            <EdgeSize>
                <AbsValue val="32"/>
            </EdgeSize>
        </Backdrop>

        <Layers>
            <Layer level="OVERLAY">
                <FontString name=$parentText" inherits="GameFontNormalSmall"
justifyH="Center" setAllPoints="true" text="GD_Guild"/>             
            </Layer>
        </Layers>

        <Scripts>
            <OnLoad>
                GD_Guild_OnLoad(self)
            </OnLoad>

            <OnEvent>
                GD_Guild_OnEvent(self, event, ...)
            </OnEvent>

            <OnClick>
                GD_Guild_ReportDPS()
            </OnClick>

            <OnDragStart>
                self:StartMoving()
            </OnDragStart>

            <OnDragStop>
                self:StopMovingOrSizing()
            </OnDragStop>
        </Scripts>
    </Button>
 </Ui>

1 个答案:

答案 0 :(得分:2)

在name = in

之后缺少引号
<FontString name=$parentText"

但是,这可能会导致XML“语法错误”(格式错误),因此可能会出现其他问题。也许你对这些评论的回答将会进一步阐明。