Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-26-10, 07:15 AM   #1
PeterAtYorkshire
A Murloc Raider
 
PeterAtYorkshire's Avatar
Join Date: Dec 2009
Posts: 4
Question Replacing GetMapZones

Hello I have been trying to create a replacement for GetMapZones() where I can add in new locations but I can't get my array to represent the same data and comes with this error.
Date: 2010-06-25 20:42:29
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\Blackrock\WorldMapFrame.lua line 647:
attempt to call upvalue 'GetAceZones' (a table value)
And this is what I have tried to replace it with:
Code:
local GetAceZones = {
	--Kalimdor ZoneNames
	[1] = {
		[1] = "Ashenvale",
		[2] = "Azshara",
		[3] = "Azuremyst lsle",
		[4] = "Bloodmyst lsle",
		[5] = "Darkshore",
		[6] = "Darnassus",
		[7] = "Desolace",
		[8] = "Durotar",
		[9] = "Dustwallow Marsh",
		[10] = "Felwood",
		[11] = "Feralas",
		[12] = "Moonglade",
		[13] = "Mulgore",
		[14] = "Orgrimmar",
		[15] = "Silithus",
		[16] = "Stonetalon Mountains",
		[17] = "Tanaris",
		[18] = "Teldrassil",
		[19] = "The Barrens",
		[20] = "The Exodar",
		[21] = "Thousand Needles",
		[22] = "Thunder Bluff",
		[23] = "Un'Goro Crater",
		[24] = "Winterspring",
		},
	--Eastern KingdomsAzeroth
	[2] = {
		[1] = "Alterac Mountains",
		[2] = "Arathi Highlands",
		[3] = "Badlands",	--"Blackrock Mountain"
		[4] = "Blasted Lands",
		[5] = "Burning Steppes",
		[6] = "Deadwind Pass",
		[7] = "Dun Morogh",
		[8] = "Duskwood",
		[9] = "Eastern Plaguelands",
		[10] = "Elwynn Forest",
		[11] = "Eversong Woods",
		[12] = "Ghostlands",
		[13] = "Hilsbrad Foothills",
		[14] = "Ironforge",
		[15] = "Isle of Quel'Danas",
		[16] = "Loch Modan",
		[17] = "Redridge Mountains",
		[18] = "Searing Gorge",
		[19] = "Silvermoon City",
		[20] = "Silverpine Forest",
		[21] = "Stormwind City",
		[22] = "Stranglethorn Vale",
		[23] = "Swamp of Sorrows",
		[24] = "The Hinterlands",
		[25] = "Tirisfal Glades",
		[26] = "Undercity",
		[27] = "Western Plaguelands",
		[28] = "Westfall",
		[29] = "Wetlands",
	},
	--Outland
	[3] = {
		[1] = "Blades Edge Mountains",
		[2] = "Hellfire Peninsula",
		[3] = "Nagrand",
		[4] = "Netherstorm",
		[5] = "Shadowmoon Valley",
		[6] = "Shattrath City",
		[7] = "Terokkar Forest",
		[8] = "Zangarmarsh",
	},
	--Northrend
	[4] = {
		[1] = "Borean Tundra",
		[2] = "Crystalsong Forest",
		[3] = "Dalaran",
		[4] = "Dragonblight",
		[5] = "Grizzly Hills",
		[6] = "Howling Fjord",
		[7] = "Icecrown",
		[8] = "Sholazar Basin",
		[9] = "Storm Peaks",
		[10] = "Wintergrasp",
		[11] = "Zul'Drak",
	},
}
...
function WorldMapZoneDropDown_Initialize()
WorldMapFrame_LoadZones(GetAceZones(GetCurrentMapContinent()));

end
I'm aware it needs to be a function of some kind but not sure how to structure it. Any input would be appreciated.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Replacing GetMapZones


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off