Results from Built-In Functions
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? |
Quote:
Code:
function YourFunction(ItemTraitType, traitDescription, traitSubtype, traitSubtypeName, traitSubtypeDescription) Doesn't matter if you don't do anything with the rest. |
Quote:
It starts taking the result variables beginning with the given index: Code:
local r5, r6 = select(5, func(whatever)) Code:
local function abc(...) |
Quote:
|
All times are GMT -6. The time now is 05:53 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI