WoW:API GetLanguageByIndex: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (GetNumLaguages became GetNumLanguages)
Line 19: Line 19:
=== Example ===
=== Example ===


  for x=1, GetNumLaguages() do
  for x=1, GetNumLanguages() do
   DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x))
   DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x))
  end
  end
Line 28: Line 28:
:Look for the 'for .. do' block at the [http://www.lua.org/manual/5.0/ Reference Manual].
:Look for the 'for .. do' block at the [http://www.lua.org/manual/5.0/ Reference Manual].


=== GetNumLaguages() ===
=== GetNumLanguages() ===


:[[API GetNumLaguages|GetNumLaguages()]] - Returns the number of languages your character can speak (I guess Blizzard's programmers mistyped that function name).
:[[API GetNumLanguages|GetNumLanguages()]] - Returns the number of languages your character can speak.


=== DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b) ===
=== DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b) ===


:;[[API ScrollingMessageFrame AddMessage|ScrollingMessageFrame:AddMessage("text",r,g,b,id)]] : Valid Frame names:<br>DEFAULT_CHAT_FRAME<br>ChatFrame1 - ChatFrame7
:;[[API ScrollingMessageFrame AddMessage|ScrollingMessageFrame:AddMessage("text",r,g,b,id)]] : Valid Frame names:<br>DEFAULT_CHAT_FRAME<br>ChatFrame1 - ChatFrame7

Revision as of 11:45, 25 September 2009

WoW API < GetLanguageByIndex

Returns the language specified by the index that your character can speak.

Language = GetLanguageByIndex(index)

Parameters

Arguments

index
index
Numeric - The index starting at 1.

Returns

Language
Language
String - Returns the language specified by the index that your character can speak.

Example

for x=1, GetNumLanguages() do
  DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x))
end

Info

for .. do

Look for the 'for .. do' block at the Reference Manual.

GetNumLanguages()

GetNumLanguages() - Returns the number of languages your character can speak.

DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b)

ScrollingMessageFrame:AddMessage("text",r,g,b,id)
Valid Frame names:
DEFAULT_CHAT_FRAME
ChatFrame1 - ChatFrame7