View Single Post
04-29-24, 02:37 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,898
Any event starting with UNIT_ should work for any valid unitid.


Originally Posted by grog162 View Post
Btw, I don't know how to get a specific output from a function that outputs multiple values. If someone could tell me the syntax for that, it would be much appreciated.
Code:
local arg1, arg2, arg3 = SomeFuncWith3Returns()
-- get all returns

local _, _, arg3 = SomeFuncWith3Returns()
-- get 3rd return

local retVal = select(2, SomeFuncWith3Returns())
-- get 2nd return (same but different to no.2 (will actually return 2 AND any others)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 04-29-24 at 03:07 PM.
  Reply With Quote