Hi otlanders,
I have a script of a key, but when I do the quest on the server, an error happens.
Below console error image
TheForgottenServer 0.4
I have a script of a key, but when I do the quest on the server, an error happens.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.uid == 3034) then
if(getPlayerStorageValue(cid, 443) < 1) then
setPlayerStorageValue(cid, 443, 1)
key = doPlayerAddItem(cid, 2089, 1)
doItemSetAttribute(key.uid, "aid", 4601)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a key.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
end
return true
end
Below console error image