• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error Quest Chayenne realm TFS 1.5

Azerty

Active Member
Joined
Apr 15, 2022
Messages
301
Solutions
4
Reaction score
31

Good night, I'm migrating to TFS 1.5 and I've been having several difficulties with the scripts I have in TFS 1.3.​

Now I have this error in actions, can someone help me?​


actions.JPG
Lua:
local chayenneLever = Action()
function chayenneLever.onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == 1945 then
        if getGlobalStorageValue(71543) <= os.time() then
            if getPlayerItemCount(cid, 13118) >= 1 then
            doTransformItem(getTileItemById({x = 33080, y = 32582, z = 3},1945).uid,1946)
            doRemoveItem(getTileItemById({x = 33075, y = 32591, z = 3}, 1498).uid, 1)
            setGlobalStorageValue(71543, os.time()+5*60)
            addEvent(Game.createItem, 60*1000, 1498, {x = 33075, y = 32591, z = 3})
        else
            doPlayerSendTextMessage(cid, 19, "You do not have the Chayenne's magical key.")
            end
        else
            doPlayerSendTextMessage(cid, 19, "You need to wait few minutes to use again.")
        end
    elseif item.itemid == 1946 then
        doTransformItem(getTileItemById({x = 33080, y = 32582, z = 3},1946).uid,1945)
    end
end

chayenneLever:aid(55021)
chayenneLever:register()
 
Solution
Try to replace this line
if getGlobalStorageValue(71543) <= os.time() then

For
if tonumber(getGlobalStorageValue(71543)) <= os.time() then
Try to replace this line
if getGlobalStorageValue(71543) <= os.time() then

For
if tonumber(getGlobalStorageValue(71543)) <= os.time() then
 
Solution
Back
Top