Ao colocar a tabela no arquivo em lib, você por acaso removeu o local que precedia a nomeação da tabela? Se não, esta é a causa do primeiro erro. Quanto ao segundo, troque: doItemSetAttribute(pokeball, heldTable[held_item[i]].attribute, nil) por: doItemSetAttribute(pokeball, heldTable[held_item[i]].
info
Group: Visconde
Joined: 07/01/12
Posts: 495
Reputation: +48
Gender: Masculino
Tibia Character: Nem Tenho
Funcionou perfeitamente, eu retirei o local que antecedia a nomeação da tabela e funcionou, porem, esqueçi de mencionar que uso sistema de icone, por isso acho que não estava conseguindo localizar a ball, por isso retirei essa parte:
if pokeball or not getItemAttribute(pokeball, "poke") then
doPlayerSendCancel(cid, "You must put on the pokeball slot a valid pokeball.")
return true
end
E funcionou perfeitamente, acho que não deve ter problemas ja que held items só são aplicaveis em pokeballs, obrigado.