Container not found(container não encontrado)
Ele não está localizando no jogador o Container com o ID X configurado, assim não sendo possivel dar o item para o jogador, e retornando um erro na Distro.
Quando tu por o script em spoiler não se esqueça de por o code box, se não quando alguém for copiar o script pra ver, vem tudo com uns caracter bugado kkk
Tente assim:
local firstItems = {} firstItems[0] = { 10518, 2173, 2458, 1988, 2378, 2503, 2509, 2647, 2160, 6132 } firstItems[1] = { 10518, 2173, 2458, 1988, 2378, 2503, 2509, 2647, 2160, 6132 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2465, 1) doPlayerAddItem(cid, 2650, 1) doPlayerAddItem(cid, 2650, 1) doPlayerAddItem(cid, 2173, 1) doPlayerAddItem(cid, 2458, 1) doPlayerAddItem(cid, 2378, 1) doPlayerAddItem(cid, 2503, 1) doPlayerAddItem(cid, 2509, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 6132, 1) else doPlayerAddItem(cid, 2465, 1) doPlayerAddItem(cid, 2650, 1) doPlayerAddItem(cid, 2650, 1) doPlayerAddItem(cid, 2173, 1) doPlayerAddItem(cid, 2458, 1) doPlayerAddItem(cid, 2378, 1) doPlayerAddItem(cid, 2503, 1) doPlayerAddItem(cid, 2509, 1) doPlayerAddItem(cid, 2647, 1) doPlayerAddItem(cid, 6132, 1) end local bag = doPlayerAddItem(cid, 10518, 1) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 7618, 1) doAddContainerItem(bag, 2383, 1) setPlayerStorageValue(cid, 30001, 1) end return TRUE end
Um erro que observei foi em:
if getPlayerSex(cid) == 0 then
Tu colocou pra add item e em seguida colocou varios else, sendo que o else siginica SENAO
Ou seja, se o jogador tiver o sexo 0 ele adiciona tal item, senão ele adiciona X item. Tendeu? um exemplo em portugol.. >
se getPlayerSex(cid) == 0 entao doPlayerAddItem(cid, 2465, 1) senao doPlayerAddItem(cid, 2465, 1) fim







info
Grupo: Campones
Registrado: 13/09/16
Posts: 96
Reputação: +4
Gênero: Masculino
Boa tarde, Servidor deu um erro meio estranho. Se alguém poder ajudar
Error
Meu Script
local firstItems = {}
firstItems[2] =
{
10518,
2173,
2458,
1988,
2378,
2503,
2509,
2647,
2160,
6132
}
firstItems[3] =
{
10518,
2173,
2458,
1988,
2378,
2503,
2509,
2647,
2160,
6132
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2650, 1)
else
doPlayerAddItem(cid, 2650, 1)
else
doPlayerAddItem(cid, 2173, 1)
else
doPlayerAddItem(cid, 2458, 1)
else
doPlayerAddItem(cid, 2378, 1)
else
doPlayerAddItem(cid, 2503, 1)
else
doPlayerAddItem(cid, 2509, 1)
else
doPlayerAddItem(cid, 2647, 1)
else
doPlayerAddItem(cid, 6132, 1)
end
local bag = doPlayerAddItem(cid, 10518, 1)
doAddContainerItem(bag, 2160, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2175, 1)
doAddContainerItem(bag, 7618, 20)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end