Ir para conteúdo
  • 0

Erro no arquivo pivi.lua


bernardes22

Pergunta

Boa Noite Galera!!

Coloquei um sistema de auro no meu servidor, dai quando o player desloga do server da esse erro alguém pode arrumar pra mim ??

aqui esta o erra que aparece no Distro, estou usando o fts 0.4

 

[25/02/2016 19:27:19] [Error - CreatureScript Interface] 
[25/02/2016 19:27:19] In a timer event called from: 
[25/02/2016 19:27:19] data/creaturescripts/scripts/login.lua:onLogin
[25/02/2016 19:27:19] Description: 
[25/02/2016 19:27:19] (luaGetThingPosition) Thing not found


[25/02/2016 19:27:19] [Error - CreatureScript Interface] 
[25/02/2016 19:27:19] In a timer event called from: 
[25/02/2016 19:27:19] data/creaturescripts/scripts/login.lua:onLogin
[25/02/2016 19:27:19] Description: 
[25/02/2016 19:27:19] (internalGetPlayerInfo) Player not found when requesting player info #6


[25/02/2016 19:27:19] [Error - CreatureScript Interface] 
[25/02/2016 19:27:19] In a timer event called from: 
[25/02/2016 19:27:19] data/creaturescripts/scripts/login.lua:onLogin
[25/02/2016 19:27:19] Description: 
[25/02/2016 19:27:19] (internalGetPlayerInfo) Player not found when requesting player info #6


[25/02/2016 19:27:19] [Error - CreatureScript Interface] 
[25/02/2016 19:27:19] In a timer event called from: 
[25/02/2016 19:27:19] data/creaturescripts/scripts/login.lua:onLogin
[25/02/2016 19:27:20] Description: 
[25/02/2016 19:27:20] (luaGetCreatureStorage) Creature not found


[25/02/2016 19:27:20] [Error - CreatureScript Interface] 
[25/02/2016 19:27:20] In a timer event called from: 
[25/02/2016 19:27:20] data/creaturescripts/scripts/login.lua:onLogin
[25/02/2016 19:27:20] Description: 
[25/02/2016 19:27:20] data/lib/Pivi.lua:34: attempt to compare number with boolean
[25/02/2016 19:27:20] stack traceback:
[25/02/2016 19:27:20]  data/lib/Pivi.lua:34: in function <data/lib/Pivi.lua:19>

Aqui esta o arquivo .lua

 

function doUseGem(cid, item)
  local voc = getPlayerVocation(cid)
  local interval = gems.interval[voc]


  if item.itemid ~= gems.id[voc] or getPlayerStorageValue(cid, gems.storage[voc]) > 0 then
    return FALSE
  end


  setPlayerStorageValue(cid, gems.storage[voc], 1)
  sendGemEffect(cid, gems.storage[voc], gems.interval[voc])
  doRemoveItem(item.uid, 1)






  return TRUE  
end




function sendGemEffect(cid, storage, interval)
local pos = getThingPos(cid)
local voc = getPlayerVocation(cid)
local color = 1
if voc == 5 then
  color = gemMsg.colorDruid[math.random(1,#gemMsg.colorElderDruid)]
elseif voc == 6 then
  color = gemMsg.colorSorcerer[math.random(1,#gemMsg.colorMasterSorcerer)]
elseif voc == 7 then
  color = gemMsg.colorPaladin[math.random(1,#gemMsg.colorRoyalPaladin)]
elseif voc == 8 then
  color = gemMsg.colorKnight[math.random(1,#gemMsg.colorEliteKnight)]
end


doSendAnimatedText(pos, gemMsg.rnd[math.random(1,#gemMsg.rnd)], color)
  if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) >= 1 then 
    addEvent(sendGemEffect, interval, cid, storage, interval)
  end
end


function doRemoveGemEffect(cid)
  if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) < 1 then
    return FALSE
  end
  setPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)], 0)
  return TRUE
end


function doRemoveAllGemEffect(cid)
  for i = 1, table.maxn(gms.storage) do
    setPlayerStorageValue(cid, gems.storage[i], 0)
  end
  return TRUE
end


function isGemActivated(cid)
  if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0 then
    return TRUE
  end
  return FALSE
end

 

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

×
×
  • Criar Novo...