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”> <!-- 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.

Namenlos
  • 1,615
  • 2
  • 18
  • 24
  • 3
    Some of your " look funny, did you edit this in word? Make sure all your `“` are in fact `"` and never use a word processor for code editing. – nvoigt Oct 22 '14 at 10:29
  • Oh my god - you're right, thanks :) I copied some of the code from a tutorial. That was the mistake. If you want you can write an answer and I'll accept it. – Namenlos Oct 22 '14 at 10:51

1 Answers1

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.

nvoigt
  • 75,013
  • 26
  • 93
  • 142