Hello, my script isnt working well, here is it:
Im getting an error in my console:
anyone know whats supposed to be wrong?
Code:
function onUse(cid, item, frompos, item2, topos)
local config = {
storage = 50012, -- change to your own storage value :)
item = 1955,
}
if getPlayerStorageValue(cid, config.storage) == -1 then
setPlayerStorageValue(cid, config.storage, 1)
doPlayerSendTextMessage(cid,25,"You have found a book.")
item = doPlayerAddItem(cid, config.item, 1) ~= -1
doSetItemText(item,"lol")
else
doPlayerSendTextMessage(cid,25,"The barrel is empty.")
end
return TRUE
end
Im getting an error in my console:
Code:
[19/06/2009 01:02:09] Lua Script Error: [Action Interface]
[19/06/2009 01:02:09] data/actions/scripts/quests/book1.lua:onUse
[19/06/2009 01:02:09] luaDoSetItemText(). Item not found
anyone know whats supposed to be wrong?