RO

[Encerrado] [Duvida] Script Com Bug

Por roriscrave, 02 de jul. de 2012 em Tópicos Sem Resposta

script
6
788
02 de julho de 2012 às 00:36

Meu server ao ficar online, fica dando esse error:

Como resolvo isso? Darei rep+

 

 

 

[02/07/2012 00:22:59] data/lib/034-exhaustion.lua:8: field 'day' missing in date table

[02/07/2012 00:22:59] stack traceback:

[02/07/2012 00:22:59] [C]: in function 'time'

[02/07/2012 00:22:59] data/lib/034-exhaustion.lua:8: in function 'check'

[02/07/2012 00:22:59] [string "loadBuffer"]:13: in function <[string "loadBuffer"]:8>

02 de julho de 2012 às 06:39

Apaga tudo e coloca isso:

 

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
}

03 de julho de 2012 às 02:24

<p>o meu ta assim, tem algum erro?

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

}

 

Editado Julho 3 por roriscrave

03 de julho de 2012 às 08:14

O erro ta em outro arquivo que usa essa lib...

Editado Julho 3 por fireelement

04 de julho de 2012 às 00:19

e como eu sei ql arquivo eh??

5 anos depois...
StigalS
20 de abril de 2018 às 00:16
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.