View Single Post
05/13/23, 12:06 AM   #2
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Originally Posted by UnDead 0rbit View Post
UseItem() claims to be protected in the Api, yet ingame im getting an attempt to use a private function error. is the api (wiki) out of date and this is changed or and I doing something wrong?

error:
Attempt to access a private function 'UseItem' from insecure code. The callstack became untrusted 2 stack frame(s) from the top.
Lua Code:
  1. if CanUseItem(bagId, slotIndex) then
  2.     -- UseItem is protected, so CallSecureProtected is used to make the call
  3.     local success = CallSecureProtected("UseItem", bagId, slotIndex)
  4.     return success
  5. end
  Reply With Quote