AD
pedido scripts

Erro Script /ban

Por Adriez, 20 de set. de 2016 em Resolvidos

suporte otserv
4
2k
AdriezA
20 de setembro de 2016 às 19:47

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>

DeadpoolD
20 de setembro de 2016 às 20:17

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

 

 

AdriezA
26 de setembro de 2016 às 10:18

[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

 

 

 

Lucas CPL
26 de setembro de 2016 às 11:22

Muda isso:

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

para isso

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