Ir para conteúdo
  • Cadastre-se

(Resolvido)Erro ao usar item (PC)


Ir para solução Resolvido por Snowsz,

Posts Recomendados

Bom dia, dar um erro na minha distro toda vez que eu vou usar o computador que fica nos centro pokemon
pra que o computador serve? pra olhar o top level e o top pesca do servidor 
 
erro ai
 

[13/05/2015 09:29:41] [Error - CreatureScript Interface] 
[13/05/2015 09:29:41] data/creaturescripts/scripts/tvsys.lua:onJoinChannel
[13/05/2015 09:29:41] Description: 
[13/05/2015 09:29:42] data/creaturescripts/scripts/tvsys.lua:11: attempt to call global 'doReloadHighscores' (a nil value)
[13/05/2015 09:29:42] stack traceback:
[13/05/2015 09:29:42]  data/creaturescripts/scripts/tvsys.lua:11: in function <data/creaturescripts/scripts/tvsys.lua:1>

script do erro
 

function onJoinChannel(cid, channelId, users, isTv)
 
 
if channelId == 10 then
doShowPokemonStatistics(cid)
return false
end
 
if channelId == 11 then
if reloadHighscoresWhenUsingPc then
doReloadHighscores()
end
doPlayerPopupFYI(cid, getHighscoreString(8))
return false
end
 
if channelId == 12 then
if reloadHighscoresWhenUsingPc then
doReloadHighscores()
end
doPlayerPopupFYI(cid, getHighscoreString(6))
return false
end
--////////////////////////////////////////////////////////////////////////////////////////--
if channelId >= 13 and channelId <= 18 then
  doSendAnimatedText(getThingPos(cid), (channelId-12).." Poke"..(channelId > 13 and "s" or ""), COLOR_BURN)
  setPlayerStorageValue(cid, 52481, (channelId-12))
  if isInParty(cid) then
          local party = getPartyMembers(cid)
          if #party >= 2 then
             for i = 1, #party do
               if getPlayerStorageValue(party[i], 52481) <= -1 then               --alterado v2.6 duel system
                  setPlayerStorageValue(party[i], 52481, (channelId-12))
               end
             end
          end 
       elseif not isInParty(cid) then
          for _, sid in ipairs(getPlayersOnline()) do
              if getPlayerStorageValue(sid, 52482) == getCreatureName(cid) then
                 if getPlayerStorageValue(sid, 52481) == -1 then
                    setPlayerStorageValue(sid, 52481, (channelId-12))
                 end
              end
          end    
       end 
  addEvent(doSendAnimatedText, 1000, getThingPos(cid), "BATTLE", COLOR_ELECTRIC) 
       doPlayerSetVocation(cid, 1)  
       return false   
    end
    --////////////////////////////////////////////////////////////////////////////////////////--
 
if channelId >= 100 and channelId <= 10000 then
 
local owner =  getPlayerByGUID(getChannelOwner(channelId))
 
if isChannelTv(channelId) then
if isCreature(owner) then
if owner ~= cid then
doPlayerWatchOther(cid, owner)
local plural = #users == 1 and "" or "s"
doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is now watching your channel (currently '..#users..' player'..plural..' watching this channel).', 15, channelId)
else
setPlayerStorageValue(cid, 99284, 1)
end
end
elseif owner == cid then
setPlayerStorageValue(cid, 99284, 2)
end
 
return true
end
 
return true
end
 
function onLeaveChannel(cid, channelId, users)
 
if channelId >= 100 and channelId <= 10000 then
 
local owner =  getPlayerByGUID(getChannelOwner(channelId))
 
if isChannelTv(channelId) then
if owner ~= cid and getCreatureOutfit(cid).lookType == 814 then
doPlayerStopWatching(cid)
local plural = #users == 2 and "" or "s"
doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is not watching your channel anymore (currently '..#users - (1)..' player'..plural..' watching this channel).', 15, channelId)
elseif owner == cid then
setPlayerStorageValue(cid, 99284, -1)
doSendAnimatedText(getThingPos(cid), "CAM OFF", 180)
for stops = 1, #users do
if users[stops] ~= owner then
doPlayerStopWatching(users[stops])
end
end
end
elseif owner == cid then
setPlayerStorageValue(cid, 99284, -1)
end
 
return true
end
 
return true
end
 
function onMove(cid, fromPosition, toPosition)
 
 
 
-- Código não é mais necessário, feito em c++
-- Code deprecated, made in c++
--if not canWalkOnPos(toPosition, false, false, false, true, false) and getPlayerStorageValue(cid, 17000) >= 1 then
-- doTeleportThing(cid, fromPosition, false)
-- doPlayerSendCancel(cid, "Sorry, not possible.")
--end
 
if getPlayerStorageValue(cid, 99284) <= 0 then return true end
 
local speed = getCreatureSpeed(cid)
local a = getWatchingPlayersFromPos(cid, fromPosition)
 
for b = 1, #a do
if getCreatureSpeed(a[b]) ~= speed then
doChangeSpeed(a[b], - getCreatureSpeed(a[b]))
doChangeSpeed(a[b], speed)
end
doTeleportThing(a[b], toPosition, true)
end
 
return true
end
 
local permited = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
"t", "u", "v", "x", "w", ",", "'", '"',
"y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ".", "!", "@", "#", "$", "%", "&", "*", "(", ")",
"-", "_", "+", "/", ";", ":", "?", "^", "~", "{", "[", "}", "]", ">", "<", "£", "¢", "¬"}
 
function onTextEdit(cid, item, newText)
 
if item.itemid == 12330 then
 
if getPlayerStorageValue(cid, 99284) >= 1 then
doPlayerSendCancel(cid, "You are already on air!")
return false
end
 
local channelName = getCreatureName(cid).."'s TV Channel"
 
if string.len(newText) <= 0 then
doPlayerSendCancel(cid, "Your channel is going to be shown as \""..getCreatureName(cid).."'s TV Channel\".")
elseif string.len(newText) > 25 then
doPlayerSendCancel(cid, "Your channel name can't have more than 25 characters.")
return false
else
channelName = newText
end
 
 
setPlayerStorageValue(cid, 99284, 1)
setPlayerStorageValue(cid, 99285, "")
setPlayerStorageValue(cid, 99285, channelName)
doPlayerCreatePrivateChannel(cid, channelName)
doSendAnimatedText(getThingPos(cid), "ON AIR!", COLOR_GRASS)
 
return false
end
 
return true
end
Link para o post
Compartilhar em outros sites
  • Solução

Tenta assim:

 

function onJoinChannel(cid, channelId, users, isTv)
 
 
if channelId == 10 then
doShowPokemonStatistics(cid)
return false
end
 
if channelId == 11 then
doPlayerPopupFYI(cid, getHighscoreString(8))
return false
end
 
if channelId == 12 then
doPlayerPopupFYI(cid, getHighscoreString(6))
return false
end
--////////////////////////////////////////////////////////////////////////////////////////--
if channelId >= 13 and channelId <= 18 then
  doSendAnimatedText(getThingPos(cid), (channelId-12).." Poke"..(channelId > 13 and "s" or ""), COLOR_BURN)
  setPlayerStorageValue(cid, 52481, (channelId-12))
  if isInParty(cid) then
          local party = getPartyMembers(cid)
          if #party >= 2 then
             for i = 1, #party do
               if getPlayerStorageValue(party[i], 52481) <= -1 then               --alterado v2.6 duel system
                  setPlayerStorageValue(party[i], 52481, (channelId-12))
               end
             end
          end 
       elseif not isInParty(cid) then
          for _, sid in ipairs(getPlayersOnline()) do
              if getPlayerStorageValue(sid, 52482) == getCreatureName(cid) then
                 if getPlayerStorageValue(sid, 52481) == -1 then
                    setPlayerStorageValue(sid, 52481, (channelId-12))
                 end
              end
          end    
       end 
  addEvent(doSendAnimatedText, 1000, getThingPos(cid), "BATTLE", COLOR_ELECTRIC) 
       doPlayerSetVocation(cid, 1)  
       return false   
    end
    --////////////////////////////////////////////////////////////////////////////////////////--
 
if channelId >= 100 and channelId <= 10000 then
 
local owner =  getPlayerByGUID(getChannelOwner(channelId))
 
if isChannelTv(channelId) then
if isCreature(owner) then
if owner ~= cid then
doPlayerWatchOther(cid, owner)
local plural = #users == 1 and "" or "s"
doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is now watching your channel (currently '..#users..' player'..plural..' watching this channel).', 15, channelId)
else
setPlayerStorageValue(cid, 99284, 1)
end
end
elseif owner == cid then
setPlayerStorageValue(cid, 99284, 2)
end
 
return true
end
 
return true
end
 
function onLeaveChannel(cid, channelId, users)
 
if channelId >= 100 and channelId <= 10000 then
 
local owner =  getPlayerByGUID(getChannelOwner(channelId))
 
if isChannelTv(channelId) then
if owner ~= cid and getCreatureOutfit(cid).lookType == 814 then
doPlayerStopWatching(cid)
local plural = #users == 2 and "" or "s"
doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is not watching your channel anymore (currently '..#users - (1)..' player'..plural..' watching this channel).', 15, channelId)
elseif owner == cid then
setPlayerStorageValue(cid, 99284, -1)
doSendAnimatedText(getThingPos(cid), "CAM OFF", 180)
for stops = 1, #users do
if users[stops] ~= owner then
doPlayerStopWatching(users[stops])
end
end
end
elseif owner == cid then
setPlayerStorageValue(cid, 99284, -1)
end
 
return true
end
 
return true
end
 
function onMove(cid, fromPosition, toPosition)
 
 
 
-- Código não é mais necessário, feito em c++
-- Code deprecated, made in c++
--if not canWalkOnPos(toPosition, false, false, false, true, false) and getPlayerStorageValue(cid, 17000) >= 1 then
-- doTeleportThing(cid, fromPosition, false)
-- doPlayerSendCancel(cid, "Sorry, not possible.")
--end
 
if getPlayerStorageValue(cid, 99284) <= 0 then return true end
 
local speed = getCreatureSpeed(cid)
local a = getWatchingPlayersFromPos(cid, fromPosition)
 
for b = 1, #a do
if getCreatureSpeed(a[b]) ~= speed then
doChangeSpeed(a[b], - getCreatureSpeed(a[b]))
doChangeSpeed(a[b], speed)
end
doTeleportThing(a[b], toPosition, true)
end
 
return true
end
 
local permited = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
"t", "u", "v", "x", "w", ",", "'", '"',
"y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ".", "!", "@", "#", "$", "%", "&", "*", "(", ")",
"-", "_", "+", "/", ";", ":", "?", "^", "~", "{", "[", "}", "]", ">", "<", "£", "¢", "¬"}
 
function onTextEdit(cid, item, newText)
 
if item.itemid == 12330 then
 
if getPlayerStorageValue(cid, 99284) >= 1 then
doPlayerSendCancel(cid, "You are already on air!")
return false
end
 
local channelName = getCreatureName(cid).."'s TV Channel"
 
if string.len(newText) <= 0 then
doPlayerSendCancel(cid, "Your channel is going to be shown as \""..getCreatureName(cid).."'s TV Channel\".")
elseif string.len(newText) > 25 then
doPlayerSendCancel(cid, "Your channel name can't have more than 25 characters.")
return false
else
channelName = newText
end
 
 
setPlayerStorageValue(cid, 99284, 1)
setPlayerStorageValue(cid, 99285, "")
setPlayerStorageValue(cid, 99285, channelName)
doPlayerCreatePrivateChannel(cid, channelName)
doSendAnimatedText(getThingPos(cid), "ON AIR!", COLOR_GRASS)
 
return false
end
 
return true
end
                              _
                          .-'` `}
                  _./)   /       }
                .'o   \ |       }
                '.___.'`.\    {`
                /`\_/  , `.    }                                      ME DA UMA NOZ!
                \=' .-'   _`\  {
                 `'`;/      `,  }
                    _\   @   ;  }
                   /__`;-...'--'

Cluck!

Link para o post
Compartilhar em outros sites

 

Tenta assim:

 

Obrigado pode mim dizer oque alterou? e já que estamos aqui pode mim ajudar a tirar esse canal NPCs dai? 

 

2s99jtf.png

 

e pode mim ajudar a tirar os membros da staff do TOP level? do GroupID 4 até 6?

Editado por TopllDanStar (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo