4

I'm trying to build a simple Hello World interface addon for World of Warcraft. But it won't work :/ Can anybody tell me what I'm doing wrong?

Here is the HelloWorld.toc file:

## Interface: 60000
## Title: HelloWorld
## Notes: HelloWorld Addon
## Version: 1.0
HelloWorld.xml

Here is the HelloWorld.xml file:

<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= “HelloWorld.lua”/>    <!-- wrong quotation here -->
    <Frame name= “HelloWorldFrame”&gt; <!-- and here (see answer)-->
        <Scripts>
            <OnLoad>
                HelloWorld_OnLoad();
            </OnLoad>
        </Scripts>
    </Frame>
</Ui>

And here is the HelloWorld.lua file:

function HelloWorld_OnLoad()
    print("Hello World!");
end

If I start the game then I can see the "HelloWorld" addon in the list. But after I login with a character nothing happens.

4

1 回答 1

3

Make sure you check all scripts for "wrong" quotation marks. Compilers or interpreters expect either " or ' (" in the case of Lua and files).

Many word processors or internet sites use different quotation marks because they "look better". But compilers aren't in it for the looks, they will not understand those better looking characters.

于 2014-10-22T10:55:22.420 回答