Postado Janeiro 20, 2015 10 anos Preciso de ajuda com esse erro, me falaram que os numeros que apareçem é onde estam os erros(numero de linhas) entao eu peguei exatamente a linha onde eu marquei o erro com >>>>>>>>>>>>>. OBS:Erro da quando eu tento atacar um digimon ou quando o digimon passa de lvl. ERRO: [20/01/2015 20:15:20] [Error - CreatureScript Interface] [20/01/2015 20:15:20] data/creaturescripts/scripts/exp.lua:onStatsChange [20/01/2015 20:15:20] Description: [20/01/2015 20:15:20] data/lib/some functions.lua:255: attempt to compare nil with number [20/01/2015 20:15:20] stack traceback: [20/01/2015 20:15:20] data/lib/some functions.lua:255: in function 'getHappinessRate' [20/01/2015 20:15:20] data/creaturescripts/scripts/exp.lua:440: in function <data/creaturescripts/scripts/exp.lua:129> exp.lua(440): local function resetMiss(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 88726, -1) end if getPlayerStorageValue(cid, 88726) ~= 1 and miss > 0 and math.random(1, 100) <= miss and damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignoremiss, combat) and not isSleeping(cid) and not getCreatureCondition(cid, CONDITION_PARALYZE) then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(cid)), false) doSendMagicEffect(getThingPos(cid), 211) doFaceCreature(cid, getThingPos(attacker)) setPlayerStorageValue(cid, 88726, 1) >>>>>>>>>>ERRO AQUI EU ACHO addEvent(resetMiss, 2200, cid) return false end some functions.lua(255): function doCorrectPokemonName(poke) return doCorrectString(poke) end function doCorrectString(poke) local name = "" local n = string.explode(poke, " ") local str = string.sub(n[1], 1, 1) >>>>>>>>>>>>>ERRO AQUI EU ACHO local sta = string.sub(n[1], 2, string.len(n[1])) name = ""..string.upper(str)..""..string.lower(sta).."" if n[2] then str = string.sub(n[2], 1, 1) sta = string.sub(n[2], 2, string.len(n[2])) name = name.." "..string.upper(str)..""..string.lower(sta).."" end return name end -------------------------------HAPPINESSRATE È CITADO NO ERRO function getHappinessRate(cid) if not isCreature(cid) then return 1 end local a = getPlayerStorageValue(cid, 1008) if a == -1 then return 1 end if a >= getConfigValue('PokemonStageVeryHappy') then return happinessRate[5].rate elseif a >= getConfigValue('PokemonStageHappy') then return happinessRate[4].rate elseif a >= getConfigValue('PokemonStageOK') then return happinessRate[3].rate elseif a >= getConfigValue('PokemonStageSad') then return happinessRate[2].rate else return happinessRate[1].rate end return 1 end exp.lua(129): local damages = {MORTALGASDAMAGE, GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, DARKDAMAGE, STEELDAMAGE, NIGHTMAREDAMAGE, GUILLOTINEDAMAGE, SEISMICTOSSDAMAGE} >>>>>>>>>>>>ERRO AQUI EU ACHO local fixdmgs = {PSYCHICDAMAGE, COMBAT_PHYSICALDAMAGE, GRASSDAMAGE, FIREDAMAGE, WATERDAMAGE, ICEDAMAGE,NORMALDAMAGE, GHOSTDAMAGE} local ignored = {NIGHTMAREDAMAGE, GUILLOTINEDAMAGE, MORTALGASDAMAGE, SEISMICTOSSDAMAGE, PSYCHOSHIFTDAMAGE, POISONEDDAMAGE, BURNEDDAMAGE} local ignoremiss = {NIGHTMAREDAMAGE, MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE} local ignorecritical = {MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE, NIGHTMAREDAMAGE} local cannotkill = {MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE, NIGHTMAREDAMAGE} function onStatsChange(cid, attacker, type, combat, value) if combat == FLYSYSTEMDAMAGE then return false end if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV local damageCombat = combat if damageCombat == THUNDERWAVEDAMAGE then damageCombat = ELECTRICDAMAGE elseif damageCombat == PSYCHOSHIFTDAMAGE then damageCombat = PSYCHICDAMAGE end if getPlayerStorageValue(cid, 33) >= 1 then -- funcionamento do self destruction if isCreature(attacker) then return false end return true end if not isCreature(attacker) or cid == attacker then if not isInArray(fixdamages, combat) and combats[combat] then doSendAnimatedText(getThingPos(cid), value, combats[combat].cor) end return true end -------------------------------------------------- if combat == SLEEP_POWDERDAMAGE then if not isSummon(cid) and not isSummon(attacker) and not isPlayer(attacker) then return false end if isPlayer(cid) then return false end if isNpcSummon(cid) and getCreatureTarget(cid) ~= attacker then return false end if isSummon(cid) and isSummon(attacker) then if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then return false end if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then return false end end doSleep(cid, value, true) return false end
Postado Janeiro 20, 2015 10 anos Solução veja se no seu config.lua tem isso aqui ó happyDropTime = 12 -- a cada "happyDropTime" segundos o pokemon vai perder HAPPINESS minHappinessEffectDelay = 25 -- a cada min de "happinessEffectDelay" segundos o pokemon vai mostrar a felicidade maxHappinessEffectDelay = 40 -- a cada min de "happinessEffectDelay" segundos o pokemon vai mostrar a felicidade PokemonStageVeryHappy = 215 -- com quanto de happy o poke precisa pra estar muito feliz PokemonStageHappy = 160 -- ... pra estar feliz PokemonStageOK = 110 -- ... pra estar normal PokemonStageSad = 50 -- ... pra estar triste PokemonStageMad = 0 -- ... pra estar bravo dropHappyDuringBattles = true -- HAPPINESS vai cair enquanto estiver batalhando ? true / false
Postado Janeiro 21, 2015 10 anos sim :v happyDropTime = 12 -- a cada "happyDropTime" segundos o pokemon vai perder HAPPINESS minHappinessEffectDelay = 25 -- a cada min de "happinessEffectDelay" segundos o pokemon vai mostrar a felicidade maxHappinessEffectDelay = 40 -- a cada min de "happinessEffectDelay" segundos o pokemon vai mostrar a felicidade PokemonStageVeryHappy = 215 -- com quanto de happy o poke precisa pra estar muito feliz PokemonStageHappy = 160 -- ... pra estar feliz PokemonStageOK = 110 -- ... pra estar normal PokemonStageSad = 50 -- ... pra estar triste PokemonStageMad = 0 -- ... pra estar bravo maximumHunger = 120 -- maior fome possivel stateHunger = 100 -- 19estagio que precisa estar pra ficar com fome increaseHunger = 7 -- a cada X segundos (xml do monstro) aumenta o hunger em "increaseHunger" decreaseHappy = 1 -- HAPPINESS que o pokemon vai perder a cada "happyDropTime" decreaseHungryHappy = 4 -- 3HAPPINESS a mais que o pokemon vai perder se estiver com fome dropHappyDuringBattles = true -- HAPPINESS vai cair enquanto estiver batalhando ? true / false Editado Janeiro 21, 2015 10 anos por Gabrieltxu (veja o histórico de edições)
Postado Janeiro 21, 2015 10 anos Autor Muito Obrigado vou testar pra ver se funciona OBRIGADO TE AMO FUNCIONOU ! os proprios adms do forum colocam como resolvido?
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.