WoW:API GetSkillLineInfo: Difference between revisions

m
No edit summary
Line 49: Line 49:


[[Category:World of Warcraft API]]
[[Category:World of Warcraft API]]
====Another Example====
:Lets say you only want a specific return value, and you do not want to waste a lot of variables or characters to get it. What you can do is assign all the returns values to an array, and then select the element of the array that corresponds with the return value you want. For example if you wanted only the skillRank of riding(if you have all the secondary skills) you can use the following code:
/script array = {GetSkillLineInfo(12)}
/script DEFAULT_CHAT_FRAME:AddMessage(array[4])
Where:
*12 is the skillIndex of Riding.
*4 is the index of the skillRank in the array
:For more information on this method try the Lua website:[http://www.lua.org/pil/5.1.html]
Anonymous user