Why OnTooltipSetUnit callback is not working?
Lua Code:
The new line is not added. What is wrong? And what arguments OnTooltipSetUnit callback should have? I've a lot of different options ('self', 'self, tooltip', 'self, ...', 'tooltip, ...' and so on)... |
You can name the arguments whatever you want. The first one provided here will be the tooltip frame and you can skip the vararg (...).
As for the line not working, you need to use :Show() for custom lines to render. You should also use the tooltip frame object you already have, not GameTooltip. Finally, you should put the hook after defining the function. TooltipCallback does not exist where you are using it. You weren't getting an error since nil is a valid argument to HookScript. Lua Code:
|
Quote:
Anyway, my addon is not working... How do you debug addons? Because I even don't know where is the problem. |
BugGrabber and BugSack work together for debugging addons.
|
As Fizzlemizz pointed out, those are great addons for enhancing error reporting.
These expand on Blizzard's own error system that depends on the scriptErrors CVar. This is disabled by default and should be turned on if you're working on code. Code:
/console scriptErrors 1 |
All times are GMT -6. The time now is 05:02 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI