You need to check if the functio is protected first and call it with CallSecureProtected then:
Lua Code:
local usefunctionIsProtected = IsProtectedFunction("UseItem")
And then use a special function construct to call it:
Lua Code:
if usefunctionIsProtected then
if not CallSecureProtected("UseItem", bagId, slotIndex) then
EndAction()
end
else
UseItem(bagId, slotIndex)
end
Originally Posted by Minceraft
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!
|