View Single Post
Unread 12-31-12, 04:04 PM   #3
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,093
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".
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote