Ir para conteúdo
  • 0

Erro Script /ban


Adriez

Pergunta

fala galera tenho um script /ban e o ip da pessoa ai bani o ip ta dando erro, como resolver ???

Spoiler

function onSay(cid, words, param, channel)
 local group = 3
  if not(getPlayerGroupId(cid) >= group) then
   return false
  end

 if (param == '') then
   return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce precisa informar o nome do jogador.")
 end
 
 local pid = getPlayerByNameWildcard(param)
 if (not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O player " .. param .. " nao está online.")
 end
 doAddIpBanishment(getPlayerIp(pid))
 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " foi banido.")
return true
end

[19:38:17.374] [Error - TalkAction Interface] 
[19:38:17.374] data/talkactions/scripts/banip.lua:onSay
[19:38:17.374] Description: 
[19:38:17.374] (luaGetCreatureName) Creature not found

[19:38:17.374] [Error - TalkAction Interface] 
[19:38:17.374] data/talkactions/scripts/banip.lua:onSay
[19:38:17.374] Description: 
[19:38:17.374] data/talkactions/scripts/banip.lua:16: attempt to concatenate a boolean value
[19:38:17.374] stack traceback:
[19:38:17.374]     data/talkactions/scripts/banip.lua:16: in function <data/talkactions/scripts/banip.lua:1>

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

tenta:

Spoiler
function onSay(cid, words, param, channel) local group = 3  if not(getPlayerGroupId(cid) >= group) then   return false  end if (param == "") then   return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce precisa informar o nome do jogador.") end  local pid = getPlayerByNameWildcard(param) if (not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O player " .. param .. " nao está online.") end doAddIpBanishment(getPlayerIp(pid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " foi banido.")return trueend

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

[Error - TalkAction Interface]
[10:17:41.735] data/talkactions/scripts/banip.lua:onSay
[10:17:41.735] Description:
[10:17:41.735] (internalGetPlayerInfo) Player not found when requesting player info #28

[10:17:41.773] [Error - TalkAction Interface]
[10:17:41.773] data/talkactions/scripts/banip.lua:onSay
[10:17:41.773] Description:
[10:17:41.773] (luaGetCreatureName) Creature not found

[10:17:41.773] [Error - TalkAction Interface]
[10:17:41.773] data/talkactions/scripts/banip.lua:onSay
[10:17:41.773] Description:
[10:17:41.773] data/talkactions/scripts/banip.lua:16: attempt to concatenate a boolean value
[10:17:41.773] stack traceback:
[10:17:41.773]     data/talkactions/scripts/banip.lua:16: in function <data/talkactions/scripts/banip.lua:2>

 

Em 20/09/2016 at 20:17, Deadpool disse:

tenta:

  Ocultar conteúdo
function onSay(cid, words, param, channel) local group = 3  if not(getPlayerGroupId(cid) >= group) then   return false  end if (param == "") then   return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce precisa informar o nome do jogador.") end  local pid = getPlayerByNameWildcard(param) if (not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O player " .. param .. " nao está online.") end doAddIpBanishment(getPlayerIp(pid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " foi banido.")return trueend

 

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

Muda isso:

 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " foi banido.")

para isso

 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param .. " foi banido.")

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...