Jump to content
meridaw

Addon Developer Resources

Recommended Posts

Nice links. Just chippin in to say that there is a problem with the Ace2 guide because it is for WoW version 2.0.1 which is The Burning Crusade and it has a different API than what the 1.12.1 client uses which makes it very hard for noob programmers to learn.

I found an old version on the guide which is suited for the 1.12.1 WoW verison on the Wayback Machine:
https://web.archive.org/web/20061102073931/http://wiki.wowace.com/wiki/WelcomeHome_-_Your_first_Ace2_Addon

Please note:  There is an error in this version of the Ace2 guide too! It's in the Locale-enUS.lua file at the bottom of the guide.

This is the incorrect code

local L = AceLibrary("AceLocale-2.2"):new("WelcomeHome")

L:RegisterTranslations("enUS", function() return {
     ["Slash-Commands"] = { "/welcomehome", "/wh" }   -- This is where the error is
     
     ["Welcome Home!"] = true, -- default message
     
     ["Message"] = true,
     ["Sets the message to be displayed when you get home."] = true,
     ["<your message>"] = true, -- usage
     
     ["Show in Chat"] = true,
     ["If set, your message will be displayed in the General chat window."] = true,
     
     ["Show on Screen"] = true,
     ["If set, your message will be displayed on the screen near the top of the game field."] = true,
} end)

The following is the correct code:

local L = AceLibrary("AceLocale-2.2"):new("WelcomeHome")

L:RegisterTranslations("enUS", function() return {
     ["Slash-Commands"] = { "/welcomehome", "/wh" }, -- Here the error is fixed
     
     ["Welcome Home!"] = true, -- default message
     
     ["Message"] = true,
     ["Sets the message to be displayed when you get home."] = true,
     ["<your message>"] = true, -- usage
     
     ["Show in Chat"] = true,
     ["If set, your message will be displayed in the General chat window."] = true,
     
     ["Show on Screen"] = true,
     ["If set, your message will be displayed on the screen near the top of the game field."] = true,
} end)

I tried to take a back up of the wayback-machine version while also fixing the Locale-enUS.lua file and uploaded it to the vanilla wowwikia here:

http://vanilla-wow.wikia.com/wiki/WelcomeHome_-_Your_first_Ace2_Addon

However, somebody still needs to try to follow this version of the guide to spot for errors. It should be error free.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×