I want to undestood why appears this message:
If i use this script "X" and this function "X"
testing.lua
function
I released what if instead the addevent of testing.lua i just use
doPene(cid,getPlayerSlotItem(cid, 8).uid) it dont show any error message.
Why?
Thanks!
Code:
[8/6/2016 22:25:44] [Error - Action Interface]
[8/6/2016 22:25:44] In a timer event called from:
[8/6/2016 22:25:44] data/actions/scripts/Testing.lua:onUse
[8/6/2016 22:25:44] Description:
[8/6/2016 22:25:44] (LuaInterface::luaGetItemAttribute) Item not found
If i use this script "X" and this function "X"
testing.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerSlotItem(cid, 8).uid ~= 0 then
addEvent(doPene,500,cid,getPlayerSlotItem(cid, 8).uid)
end
return true
end
function
Code:
function doPene(cid, iten)
if not isCreature(cid) then return true end
if getItemAttribute(iten, "poke") then
local confuse = getItemAttribute(iten, "poke")
if iten ~= 0 then
doCreatureSay(cid,confuse,TALKTYPE_SAY)
end
end
end
I released what if instead the addevent of testing.lua i just use
doPene(cid,getPlayerSlotItem(cid, 8).uid) it dont show any error message.
Why?
Thanks!