View Single Post
02-01-09, 03:45 AM   #608
grimman
A Fallenroot Satyr
 
grimman's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 28
I'm really miffed by this. I see lots of people using select() to do various stuff, lua.org has a bunch of examples using select() and Slouken shows up more than once on google giving examples... but I just can't use it.
Code:
function dummyfunction()
print(select(2, UnitClass("player")))
end
That code throws an error (something to do with select, I don't remember the exact wording).
Using it with /script print(select(1, UnitClass("player"))) just gives me "Paladin PALADIN", which isn't even the expected output (though the class is obviously right). wth am I doing wrong?

I only tried this stuff because I was curious about your statement, haste. For the record, I can do local _,class=UnitClass("player") ~1m times per second. Even if select() was twice as slow/fast/whatever (and worked!) it wouldn't be likely to impact anything unless the coder is an outright idiot.