HI, have 1 problem in script.
On i used msg \/
[0:51:10.890] [Error - Action Interface]
[0:51:10.906] data/actions/scripts/lock.luanUse
[0:51:10.906] Description:
[0:51:10.906] data/actions/scripts/lock.lua:6: attempt to compare number with ni
l
[0:51:10.906] stack traceback:
[0:51:10.906] data/actions/scripts/lock.lua:6: in function <data/actions/scrip
ts/lock.lua:1>
I ADD REP ++
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = {
a = {6578, 3213, 3213, 341, 3213}, -- allowed items to lock
b = (getGlobalStorageValue(2912)+7000)
}
if getItemAttribute(item.uid, "aid") >= 1 then
doPlayerSendCancel(cid, "Sorry, this item is already locked, if it's not locked please contact the owner")
end
if isInArray(t.a, item.itemid) then
doItemSetAttribute(item.uid, "aid", t.b)
doPlayerSetStorageValue(cid, 2912, (getGlobalStroageValue(2912)))
doItemSetAttribute(item.uid, "name", getItemInfo(item.itemid).name .. " that belongs to ".. getCreatureName(cid))
doPlayerSendTextMessage(cid, 21, "This item has been marked as yours!")
setGlobalStorageValue((b)+1)
end
return TRUE
end
On i used msg \/
[0:51:10.890] [Error - Action Interface]
[0:51:10.906] data/actions/scripts/lock.luanUse
[0:51:10.906] Description:
[0:51:10.906] data/actions/scripts/lock.lua:6: attempt to compare number with ni
l
[0:51:10.906] stack traceback:
[0:51:10.906] data/actions/scripts/lock.lua:6: in function <data/actions/scrip
ts/lock.lua:1>
I ADD REP ++