4 horas atrás, zPerseu disse:Eae galera vou mostrar o erro
script
function onUse(cid, item, frompos, item2, topos)
local monstro = getItemAttribute(item.uid, "corpse")
local health = getItemAttribute(item.uid, "health")
local name = getItemAttribute(item.uid, "monstro")
if #getCreatureSummons(cid) > 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ja esta usando uma reencarnação !")
return true
end
if getPlayerMana(cid) < health/100*70 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem chakra suficiente")
return true
end
if getPlayerStorageValue(cid, 24436) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode invocar mais de uma reanimação junto.")
return true
end
t = doCreateMonster(monstro, getThingPos(cid))
doConvinceCreature(cid, t)
setCreatureMaxHealth(t, health)
doCreatureAddHealth(t, health)
doPlayerAddMana(t, -getItemAttribute(item.uid, "health")/90)
setPlayerStorageValue(cid, 24436, name)
return true
end
O atributo health do item tá retornando nil, porque provavelmente não existe, pelo menos nesse item q tu tentou usar. Aí quando, nessa linha: if getPlayerMana(cid) < health/100*70 then, tu tenta dividir o atributte por 100 e multiplicar por 70 comparando ele com o getPlayerMana, dá esse erro. Resumindo, tu tentou fazer uma operação matemática com um valor nulo.
Provavelmente, ou o item não tem esse atributo corretamente, ou esse atributo não tem no teu servidor/funciona de um jeito diferente




com corpse do player
selado o player porque eu cliquei no pergaminho e depois cliquei nele
cliquei no pergaminho selado e depois cliquei no chao pra usar ele como monster
pode se usar 4 Edos Tensei sao 4 Vocaçoes KABUTO,TOBIRAMA E OROCHIMARU se puder criar script fico feliz
info
Grupo: Campones
Registrado: 22/04/16
Posts: 37
Reputação: +1
Gênero: Masculino
Eae galera vou mostrar o erro
http://prntscr.com/ces2be
script
function onUse(cid, item, frompos, item2, topos)
local monstro = getItemAttribute(item.uid, "corpse")
local health = getItemAttribute(item.uid, "health")
local name = getItemAttribute(item.uid, "monstro")
if #getCreatureSummons(cid) > 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ja esta usando uma reencarnação !")
return true
end
if getPlayerMana(cid) < health/100*70 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem chakra suficiente")
return true
end
if getPlayerStorageValue(cid, 24436) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode invocar mais de uma reanimação junto.")
return true
end
t = doCreateMonster(monstro, getThingPos(cid))
doConvinceCreature(cid, t)
setCreatureMaxHealth(t, health)
doCreatureAddHealth(t, health)
doPlayerAddMana(t, -getItemAttribute(item.uid, "health")/90)
setPlayerStorageValue(cid, 24436, name)
return true
end