Owner Maydel
Evolera.Tk
[9:20:10.229] exhaustion.set(cid, configRunEvent.storages.exhaust, 5)
[9:20:10.229] return true
[9:20:10.229] end
[9:20:10.229]
nSay
[9:20:10.229] Description:
[9:20:10.229] data/lib/034-exhaustion.lua:4: field 'day' missing in date table
[9:20:10.229] stack traceback:
[9:20:10.229] [C]: in function 'time'
[9:20:10.229] data/lib/034-exhaustion.lua:4: in function 'check'
[9:20:10.229] [string "LuaInterface::loadBuffer"]:12: in function <[string "LuaInterface::loadBuffer"]
Lib Script
I Need Some One Help Me @Cykotitan OR @HalfAway
[9:20:10.229] return true
[9:20:10.229] end
[9:20:10.229]
[9:20:10.229] Description:
[9:20:10.229] data/lib/034-exhaustion.lua:4: field 'day' missing in date table
[9:20:10.229] stack traceback:
[9:20:10.229] [C]: in function 'time'
[9:20:10.229] data/lib/034-exhaustion.lua:4: in function 'check'
[9:20:10.229] [string "LuaInterface::loadBuffer"]:12: in function <[string "LuaInterface::loadBuffer"]
Lib Script
Code:
exhaustion =
{
check = function (cid, storage)
if(getPlayerStorageValue(cid, storage) >= os.time(t)) then
return TRUE
end
return FALSE
end,
get = function (cid, storage)
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
}