View Single Post
12-31-12, 04:04 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Also, even if you fixed the other issues, your function will never return any information about any unit other than "player" or "target" because of this (fixed formatting for readability):
Code:
    if not UnitExists(unit) then
        unit = "player"
    else
        unit = "target"
    end
No matter what unit you pass to the function, it will overwrite it with "player" or "target".
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote