View Single Post
04/04/22, 09:00 AM   #3
static_recharge
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 35
Originally Posted by Baertram View Post
Did you disable all other addons for testing, just to make sure it's nothing any other lib or addon interferes with?
Do you get any error message as this happens?

Your code looks okay to me and the return true should prevent the original function to start.
But maybe the function DestroyAllJunk is global but potected, so you cannot hook them. You should get an error message then I think (or it will just fail silently).

Try to use IsProtectedFunction(functionName) to check that.
When I run the function from chat:
Code:
/script DestroyAllJunk()
My test message shows up. When I run it from the UI by hitting the hotkey while having at least one item on the junk tab it opens up the dialogue to confirm and then runs the function, as in it doesn't print my message and instead deletes the junk.

Edit: Yes I have only my new add-on running, nothing else.
  Reply With Quote