Originally Posted by Rhyono
I'm sure this has a very simple answer, but: How do I choose just a piece of the return from ZoS functions that have multiple? I thought it might be a table, but doing it that way didn't work.
For example (from the wiki):
GetItemLinkTraitInfo(string itemLink)
Returns: number ItemTraitType traitType, string traitDescription, number traitSubtype, string traitSubtypeName, string traitSubtypeDescription
If I wanted just the trait subtype, how would I write that?
|
Code:
function YourFunction(ItemTraitType, traitDescription, traitSubtype, traitSubtypeName, traitSubtypeDescription)
local yourvariable = traitSubtype
end
Trick is to list them all in the right order, since it's not the name but simply the order things are being send YourFunction(1st item, 2nd item, 3rd item, etc)
Doesn't matter if you don't do anything with the rest.