WoW:API GetNumLanguages: Difference between revisions
Jump to navigation
Jump to search
m (Fix sample code) |
m (Removed redundant →Info: section. Added __NOTOC__. Added Notes.) |
||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{wowapi}} | {{wowapi}} | ||
Line 11: | Line 12: | ||
=== Returns === | === Returns === | ||
: | ;NumLanguages : Numeric - Returns the number of languages your character can speak. | ||
== Example == | |||
for x=1, GetNumLanguages() do | for x=1, GetNumLanguages() do | ||
DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x)) | [[API ScrollingMessageFrame AddMessage|DEFAULT_CHAT_FRAME:AddMessage]]([[API GetLanguageByIndex|GetLanguageByIndex(x)]]) | ||
end | end | ||
== | == Notes == | ||
* Currently (v3.0.3) this function returns either 1 or 2. For Humans and Orcs, it returns 1. For all other races, it returns 2. | |||
Revision as of 17:17, 27 December 2008
Returns the number of languages your character can speak.
NumLanguages = GetNumLanguages()
Parameters
Arguments
- none
Returns
- NumLanguages
- Numeric - Returns the number of languages your character can speak.
Example
for x=1, GetNumLanguages() do DEFAULT_CHAT_FRAME:AddMessage(GetLanguageByIndex(x)) end
Notes
- Currently (v3.0.3) this function returns either 1 or 2. For Humans and Orcs, it returns 1. For all other races, it returns 2.