Postado Agosto 1, 2014 10 anos fica dando esse erro na distro [01/08/2014 12:53:08] [Error - Spell Interface] [01/08/2014 12:53:08] In a timer event called from: [01/08/2014 12:53:08] data/spells/scripts/poke/fury attack.lua:onCastSpell [01/08/2014 12:53:08] Description: [01/08/2014 12:53:08] data/spells/scripts/poke/fury attack.lua:41: attempt to perform arithmetic on field 'damage' (a nil value) [01/08/2014 12:53:08] stack traceback: [01/08/2014 12:53:08] data/spells/scripts/poke/fury attack.lua:41: in function <data/spells/scripts/poke/fury attack.lua:36> [01/08/2014 12:53:44] > Broadcasted message: "Full server save within 120 seconds, please mind it may freeze!". local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, NORMALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 146) function onCastSpell(cid, var) doCreatureSay(cid, "FURY ATTACK!", TALKTYPE_MONSTER) if getPlayerStorageValue(cid, 3) >= 1 then doSendAnimatedText(getThingPos(cid), "MISS", 215) setPlayerStorageValue(cid, 3, -1) return true end if getPlayerStorageValue(cid, 5) >= 1 then if math.random(1,100) <= 33 then doSendAnimatedText(getThingPos(cid), "SELF HIT", 180) if isPlayer(getCreatureTarget(cid)) then huah = getPlayerLevel(getCreatureTarget(cid)) else huah = getPlayerLevel(getCreatureMaster(getCreatureTarget(cid))) end local levels = huah doTargetCombatHealth(getCreatureTarget(cid), cid, COMBAT_PHYSICALDAMAGE, -(math.random((levels*3),(levels*5))), -((math.random((levels*3),(levels*5))+10)), 3) return true end end if getCreatureName(cid) == "Beedrill" then dano = 85 elseif getCreatureName(cid) == "Doduo" then dano = 31 elseif getCreatureName(cid) == "Dodrio" then dano = 105 end local damage = dano local meualvo = getCreatureTarget(cid) local function pee(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.meualvo then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)), 15) doAreaCombatHealth(params.cid, NORMALDAMAGE, getThingPos(getCreatureTarget(params.cid)), 0, -(params.damage), -((params.damage)+5), 3) end end end end local delay = 200 randnee = math.random(1,100) if randnee >= 1 and randnee <= 37 then a = 2 elseif randnee >= 38 and randnee <= 74 then a = 3 elseif randnee >= 75 and randnee <= 88 then a = 4 else a = 5 end local times = a for i = 1,a do addEvent(pee, delay, {cid = cid, meualvo = meualvo, damage = damage}) delay = delay + 600 end local function msg(params) if isCreature(params.cid) then doSendAnimatedText(getThingPos(params.cid), ""..times.." HITS", 35) end end addEvent(msg, 580*a, {cid = cid}) return true end
Postado Agosto 1, 2014 10 anos Autor "local damage = dano" tenta alterar solved Editado Agosto 1, 2014 10 anos por Valakinhas (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.