ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   UseItem() not working (https://www.esoui.com/forums/showthread.php?t=10541)

UnDead 0rbit 05/12/23 11:37 PM

UseItem() not working
 
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.

Masteroshi430 05/13/23 12:06 AM

Quote:

Originally Posted by UnDead 0rbit (Post 47769)
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

UnDead 0rbit 05/13/23 12:09 AM

Quote:

Originally Posted by Masteroshi430 (Post 47770)
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


Thanks for the help


All times are GMT -6. The time now is 02:58 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI