Thread: 1.6 update
View Single Post
04/10/15, 02:12 PM   #66
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
You need to check if the functio is protected first and call it with CallSecureProtected then:

Lua Code:
  1. local usefunctionIsProtected = IsProtectedFunction("UseItem")

And then use a special function construct to call it:

Lua Code:
  1. if usefunctionIsProtected then
  2.         if not CallSecureProtected("UseItem", bagId, slotIndex) then
  3.           EndAction()
  4.         end
  5.       else
  6.         UseItem(bagId, slotIndex)
  7.       end


Originally Posted by Minceraft View Post
I was wondering if they had moved this function to the private list in the latest stuff. I keep getting the UI error shown below...
So, is there a special way that I'm supposed to call protected functions? Let me know if I'm missing anything! And, Good Job with the forum guys!! Lookin great!! I'll try to contribute as much as I can!! Thanks for all the help!
  Reply With Quote