View Single Post
09-17-09, 09:16 PM   #11
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I teach piano and voice lessons privately.

Code:
 	local _, _, _, _, _, _, _, _, _, _, lfg, lfm = GetLookingForGroup()
With so many return values, and the ones you want being all the way at the end, you could use select() for readability. Would add an extra function call to your code, but I don't think you'll be calling it often enough to matter.

Code:
local lfg, lfm = select(11, GetLookingForGroup())
This gives you returns 11+. Also, I don't think this line
Code:
	return lfg or lfm, lfg, lfm
does what you think it does. That line there returns 3 values. 1. lfg or lfm (whichever is valid first, left to right), 2. the value of lfg, and 3. the value of lfm. But you're trying to use it as just a basic check. Instead, do this:
Code:
local lfg, lfm = select(11, GetLookingForGroup())
if lfg or lfm then
			playerDisable = GetGroupStatus()
			Leave()

/edit: I should note that the addon SaneLFG allows a person to be in both LFG *and* LFM.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh


Last edited by Seerah : 09-17-09 at 09:19 PM.
  Reply With Quote