Wikia

WoWWiki

Changes: API GetTradeSkillSelectionIndex

Edit

Back to page

({{wowapi}}, format)
 
Line 1: Line 1:
<center>'''GetTradeSkillSelectionIndex''' ''-Documentation by [[User:Goldark|Goldark]]-''</center>
+
{{wowapi}} __NOTOC__
 
 
Returns the index of the currently selected trade skill.
 
Returns the index of the currently selected trade skill.
 
 
local tradeSkillIndex = GetTradeSkillSelectionIndex();
 
local tradeSkillIndex = GetTradeSkillSelectionIndex();
   
----
+
==Parameters==
;''Arguments''
+
===Returns===
  +
:; tradeSkillIndex : Number - The index of the currently selected trade skill, or 0 if none selected.
   
: none
+
==Example==
 
----
 
;''Returns''
 
 
: Number tradeSkillIndex
 
 
:; tradeSkillIndex : The index of the currently selected trade skill, or 0 if none selected.
 
 
----
 
;''Example''
 
 
if ( GetTradeSkillSelectionIndex() > 1 ) then
 
if ( GetTradeSkillSelectionIndex() > 1 ) then
 
TradeSkillFrame_SetSelection(GetTradeSkillSelectionIndex());
 
TradeSkillFrame_SetSelection(GetTradeSkillSelectionIndex());
Line 15: Line 14:
 
end;
 
end;
 
end;
 
end;
 
 
 
----
 
{{WoW API}}
 

Latest revision as of 23:10, December 23, 2006

WoW API < GetTradeSkillSelectionIndex

Returns the index of the currently selected trade skill.

local tradeSkillIndex = GetTradeSkillSelectionIndex();

ParametersEdit

ReturnsEdit

tradeSkillIndex 
Number - The index of the currently selected trade skill, or 0 if none selected.

ExampleEdit

if ( GetTradeSkillSelectionIndex() > 1 ) then
  TradeSkillFrame_SetSelection(GetTradeSkillSelectionIndex());
else
  if ( GetNumTradeSkills() > 0 ) then
    TradeSkillFrame_SetSelection(GetFirstTradeSkill());
  end;
end;

Around Wikia's network

Random Wiki