Hello
i got an error in my talkactions
im using a talkaction in war server to change between towns but i have a problem as you can see in this error log
this is my 034-exhaustion.lua file
and this is the talkaction script.
Please help me to fix that im using TFS 0.4 tibia 8.6
i got an error in my talkactions
im using a talkaction in war server to change between towns but i have a problem as you can see in this error log
Code:
[Error - TalkAction Interface]
data/talkactions/scripts/towns2.lua:onSay
Description:
data/lib/034-exhaustion.lua:8: field 'day' missing in date table
stack traceback:
[C]: in function 'time'
data/lib/034-exhaustion.lua:8: in function 'check'
data/talkactions/scripts/towns2.lua:9: in function <data/talkactions/scripts/towns2.lua:1>
[Error - TalkAction Interface]
data/talkactions/scripts/towns.lua:onSay
Description:
data/lib/034-exhaustion.lua:8: field 'day' missing in date table
stack traceback:
[C]: in function 'time'
data/lib/034-exhaustion.lua:8: in function 'check'
data/talkactions/scripts/towns.lua:9: in function <data/talkactions/scripts/towns.lua:1>
this is my 034-exhaustion.lua file
Code:
exhaustion =
{
check = function (cid, storage)
if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
return false
end
return getPlayerStorageValue(cid, storage) >= os.time(t)
end,
get = function (cid, storage)
if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
return false
end
local exhaust = getPlayerStorageValue(cid, storage)
if(exhaust > 0) then
local left = exhaust - os.time(t)
if(left >= 0) then
return left
end
end
return false
end,
set = function (cid, storage, time)
setPlayerStorageValue(cid, storage, os.time(t) + time)
end,
make = function (cid, storage, time)
local exhaust = exhaustion.get(cid, storage)
if(not exhaust) then
exhaustion.set(cid, storage, time)
return true
end
return false
end
}
and this is the talkaction script.
Code:
function onSay(cid, words, param)
local pos = {x = 994, y = 896, z = 6}
if hasCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, "You Can't Teleport In Fight")
return true
end
if exhaustion.check(cid, 9002) then
doPlayerSendCancel(cid, "Count Down System Please Wait "..exhaustion.get(cid,9002).." Second.")
return true
end
if not isPlayer(getTopCreature(pos).uid) then
doTeleportThing(cid, pos)
doCreatureSay(cid, 'Have Fun.', 19, false, cid)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
exhaustion.set(cid, 9002, 1*60)
return
end
end
Please help me to fix that im using TFS 0.4 tibia 8.6