_Aion_
Nothing Else
Hello, I have a big problem.
I'm using a script that doubles exp for 5 hours, but is giving error.
ERROR
SCRIPT
i'm using TFS 0.3.6
I will not be giving the reason for these bug, not just in this script.
has to do with the sourcer?
NOTE: This script was originally made for TFS 0.3.4, I believe that these changes must have changed something in the script if they can help me
Thanks
I'm using a script that doubles exp for 5 hours, but is giving error.
ERROR
Code:
Error - CreatureScript Interface]
data/creaturescripts/scripts/extraExpRate.lua:onLogin
Description:
data/creaturescripts/scripts/extraExpRate.lua:14: attempt to compare number with string
stack traceback:
data/creaturescripts/scripts/extraExpRate.lua:14: in function <data/creaturescripts/scripts/extraExpRate.lua:12>
SCRIPT
Code:
local config = {
rate = 1.6, -- 4x More Experience
storage = 20012
}
local function endExpRate(cid)
if isPlayer(cid) == TRUE then
doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate
setPlayerStorageValue(cid, config.storage, -1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua Token ja terminou.")
end
end
function onLogin(cid)
local str = getPlayerStorageValue(cid, config.storage)
if(str >= 0 and (str - os.time()) > 0) then
doPlayerSetRate(cid, SKILL__LEVEL, config.rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua Double Exp Token vai até: " .. os.date("%X", str))
addEvent(endExpRate, (str - os.time()) * 1000, cid)
else
doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao possui Token.")
setPlayerStorageValue(cid, config.storage, -1)
end
return TRUE
end
i'm using TFS 0.3.6
I will not be giving the reason for these bug, not just in this script.
has to do with the sourcer?
NOTE: This script was originally made for TFS 0.3.4, I believe that these changes must have changed something in the script if they can help me
Thanks
Last edited: