WoW:API GetNumLanguages: Difference between revisions
Jump to navigation
Jump to search
(Updated page to reflect correction of the typo.) |
m (Fix sample code) |
||
Line 2: | Line 2: | ||
Returns the number of languages your character can speak. | Returns the number of languages your character can speak. | ||
NumLanguages = GetNumLanguages() | NumLanguages = GetNumLanguages() | ||
Line 19: | Line 17: | ||
=== Example === | === Example === | ||
for x=1, | for x=1, GetNumLanguages() do | ||
DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x)) | DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x)) | ||
end | end |
Revision as of 23:19, 21 June 2008
Returns the number of languages your character can speak.
NumLanguages = GetNumLanguages()
Parameters
Arguments
- none
Returns
- NumLanguages
- NumLanguages
- Numeric - Returns the number of languages 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.
GetLanguageByIndex(index)
- GetLanguageByIndex(index) - Returns the language specified by the index.
DEFAULT_CHAT_FRAME:AddMessage("text",r,g,b)
- ScrollingMessageFrame:AddMessage("text",r,g,b,id)
- Valid Frame names:
DEFAULT_CHAT_FRAME
ChatFrame1 - ChatFrame7