[Encerrado] Erro Trade_Back

renansdc
em Tópicos Sem Resposta

renansdc

(std::string _name (RenanSdc))
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 16/11/07Posts: 200

Fala galera do XT

Baixei o PDA aqui pra brincar e está dando este erro relatado abaixo quando tento voltar pro CP vindo do Trade_Center.

 

 

[23/01/2013 11:15:04] [Error - MoveEvents Interface]

[23/01/2013 11:15:04] data/movements/scripts/PVP/Trade_Back.lua:onStepIn

[23/01/2013 11:15:04] Description:

[23/01/2013 11:15:04] data/lib/011-string.lua:16: bad argument #1 to 'find' (string expected, got nil)

[23/01/2013 11:15:04] stack traceback:

[23/01/2013 11:15:04] [C]: in function 'find'

[23/01/2013 11:15:04] data/lib/011-string.lua:16: in function '(for generator)'

[23/01/2013 11:15:04] data/lib/011-string.lua:16: in function 'explode'

[23/01/2013 11:15:04] data/movements/scripts/PVP/Trade_Back.lua:14: in function <data/movements/scripts/PVP/Trade_Back.lua:3>

 

Obrigado.

Abraços.

 

 

 

 

 

 

 

fanbarjj.png











Retired~ s2 all

 



 

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

vc fez todas as atualizaçoes?

1.6 full - 1.6.1 - 1.7 e 1.8 ou

2.6 full - 2.6.1 - 2.7 e 2.8?

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

renansdc

(std::string _name (RenanSdc))
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 16/11/07Posts: 200

Sim, atualizei...

Tanto que é apenas isso que está dando erro, o resto ta perfeito.

 

O script:

local tileClans = {33800, 33801, 33802, 33803, 33804, 33805, 33806, 33807, 33808}

-- psy ore win nat sea gard male rai volc

function onStepIn(cid, item, pos)

if isSummon(cid) then

return false

end

--

local storage = 171877

if isInArray(tileClans, item.actionid) then

storage = 171878

end

--

local b = string.explode(getPlayerStorageValue(cid, storage), "/")

local t = string.explode(b[2], ";")

--

if #getCreatureSummons(cid) >= 1 then

for i = 1, #getCreatureSummons(cid) do

doTeleportThing(getCreatureSummons(cid), {x=tonumber(t[1]) - 1, y=tonumber(t[2]), z=tonumber(t[3])}, false)

end

end

doTeleportThing(cid, {x=tonumber(t[1]), y=tonumber(t[2]), z=tonumber(t[3])}, false)

setPlayerStorageValue(cid, storage, -1)

return true

end

Abraços.

 

 

 

 

 

 

 

fanbarjj.png











Retired~ s2 all

 



 

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

achu q tu esqueceu isso.. lib/011-string.lua

 

string.split = function (str)
   local t = {}
   return not str:gsub("%w+", function(s) table.insert(t, s) return "" end):find("%S") and t or {}
end

string.trim = function (str)
   return str:gsub("^%s*(.-)%s*$", "%1")
end

string.explode = function (str, sep, limit)
   if(type(sep) ~= 'string' or isInArray({tostring(str):len(), sep:len()}, 0)) then
       return {}
   end

   local i, pos, tmp, t = 0, 1, "", {}
   for s, e in function() return string.find(str, sep, pos) end do
       tmp = str:sub(pos, s - 1):trim()
       if tmp ~= "" then			   --alterado v1.8
          table.insert(t, tmp)
    end
       pos = e + 1

       i = i + 1
       if(limit ~= nil and i == limit) then
           break
       end
   end

   tmp = str:sub(pos):trim()
   if tmp ~= "" then			  --alterado v1.8
   table.insert(t, tmp)
   end
   return t
end

string.expand = function (str)
   return string.gsub(str, "$(%w+)", function(n) return _G[n] end)
end

string.timediff = function (diff)
   local format = {
       {"week", diff / 60 / 60 / 24 / 7},
       {"day", diff / 60 / 60 / 24 % 7},
       {"hour", diff / 60 / 60 % 24},
       {"minute", diff / 60 % 60},
       {"second", diff % 60}
   }

   local t = {}
   for k, v in ipairs(format) do
       local d, tmp = math.floor(v[2]), ""
       if(d > 0) then
           tmp = (k < table.maxn(format) and (table.maxn(t) > 0 and ", " or "") or " and ") .. d .. " " .. v[1] .. (d ~= 1 and "s" or "")
           table.insert(t, tmp)
       end
   end

   return t
end

 

 

se n der eh pq a storage do player ja ta errada e dai n tem muito oq fazer.. teria q reseta as storages usadas pelo sistema..

171877 e 171878

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

renansdc

(std::string _name (RenanSdc))
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 16/11/07Posts: 200

Dúvida sanda, tópico pode ser fechado.

Obrigado.

Abraços.

 

 

 

 

 

 

 

fanbarjj.png











Retired~ s2 all

 



 

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

sanado, movido

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

Katxz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/12/10Posts: 32

Slicer Tenho o mesmo problema e n consigo resolver xd

What the fuck?

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
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.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel