There's an obvious error in the last snippet of code you posted.
The function is passed a 'unit' parameter but in the code you're checking against 'UnitID'.
Apart from that, we need more code.
Which addon is it, can you post a pastey of the full code?
|