Luka Trklja
Member
I dont even know what triggers it, TFS 0.3.6 8.6 LINUX
034-exhaustion
Code:
[Error - TalkAction Interface]
buffer:onSay
Description:
data/lib/034-exhaustion.lua:28: field 'day' missing in date table
stack traceback:
[C]: in function 'time'
data/lib/034-exhaustion.lua:28: in function 'set'
[string "loadBuffer"]:21: in function <[string "loadBuffer"]:8>
034-exhaustion
Lua:
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
}