What's wrong with my basic test addon?

Hey all,

Sorry if this is the wrong subforum. I’m attempting to learn how to write addons and have got off to a bad start.

I’m relieving the error “mismatched tag” from my XML file

The code is very simple and notepad++ seems to think everything is in order.

    <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="HellowWorld.lua"/>
 <Frame name="HelloWorldFrame">
 <Scripts>
 <OnLoad>
 HelloWorld(self);
 </Onload>
 </Scripts>
 </Frame>
 </Ui>

Any and all help appreciated.

I’m not an addon maker in particular, but is there a reason for the “self” inside your HelloWorld() function? Try removing that and see if it works.

It’s just what the tutorial I was following said to input. I tried removing it, saving and reloading but I got the same error.

Edit - Found the error, the second “OnLoad” didn’t have the “l” capitalised.

If you think about makin and addon check this:

http://wowprogramming.com/

Also if you think about making a more complex addon you should take a look at the Ace3 framework and other libs that can make the proceess easier and provide you with some functionality you don’t need to code.

And to check if your xml file is valid notepad++ doesn’t do that. It just highlites the syntax. You need to use some validator.

You can try this: https://www.xmlvalidation.com/ just ignore errors about the first line.

1 Like

Thanks for all the resources! Much appreciated!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.