WoW:API GetMapContinents: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Move page script moved page API GetMapContinents to API GetMapContinents without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
===Returns===
===Returns===
:continent_1, continent_2, ..., continent_N
:continent_1, continent_2, ..., continent_N
:;continent_''i'' : String - The name of the ''i'''th continent, (i corresponds to the value [[API GetCurrentMapContinent|GetCurrentMapContinent()]] returns)
:;continent_''i'' : String - The name of the ''<nowiki>i'</nowiki>''th continent, (i corresponds to the value [[API GetCurrentMapContinent|GetCurrentMapContinent()]] returns)


==Example==
==Example==
Line 16: Line 16:
===Result===
===Result===
A list of the continent names is displayed in the default chat frame.
A list of the continent names is displayed in the default chat frame.
  #1: Kalimdor
  #1: Kalimdor
  #2: Eastern Kingdoms
  <nowiki>#</nowiki>2: Eastern Kingdoms
  #3: Outland
  <nowiki>#3: Outland
  #4: Northrend
  #4: Northrend
  #5: The Maelstrom
  #</nowiki>5: The Maelstrom
<nowiki>#6: Pandaria
#</nowiki>7: Draenor


==Details==
==Details==
Note that as more expansions are releases, the output of this function may change.
Note that as more expansions are releases, the output of this function may change.

Latest revision as of 04:46, 15 August 2023

WoW API < GetMapContinents

Returns a list of continent names.

continent_1, continent_2, ..., continent_N = GetMapContinents();

Parameters

Returns

continent_1, continent_2, ..., continent_N
continent_i
String - The name of the i'th continent, (i corresponds to the value GetCurrentMapContinent() returns)

Example

local continentNames, key, val = { GetMapContinents() } ;
for key, val in pairs(continentNames) do
 DEFAULT_CHAT_FRAME:AddMessage("#" .. key .. ": " .. val);
end

Result

A list of the continent names is displayed in the default chat frame.

#1: Kalimdor
#2: Eastern Kingdoms
#3: Outland
 #4: Northrend
 #5: The Maelstrom
#6: Pandaria
 #7: Draenor

Details

Note that as more expansions are releases, the output of this function may change.