ptisnjunk95
Made in Portugal
- 116
- Posts
- 12
- Years
- Portugal
- Seen Oct 22, 2016
Hey guys,
So I was testing a battle to check Mega Evolution and I got an error when the NPC used Bug Bite on Mega Venusaur:
The Game didn't crash, instead the Bug Bite hitted more 6 times, showing this error after the move hit Mega Venusaur, then it stopped using the Move. At first I thought it was happening because it was Mega Evolved and had the Mega Stone attached. So I repeated the battle with a Croconaw with no Items attached, and the error continued.
Has someone faced the same issue and know how to fix it?
I'm using Essentials v16.1 with Elite Battle and Project Generation 6 implemented.
Thanks in advance,
EDIT: A friend of mine (Adre76, Reddit user if you want thank him there xD ) solved the problem. It appears that the class PokeBattle_Move_0F4 < PokeBattle_Move (line 6820) in the PokeBattle_MoveEffects is not good implemented. So you should change that class (lines 6820 - 6853) into this:
So I was testing a battle to check Mega Evolution and I got an error when the NPC used Bug Bite on Mega Venusaur:
Spoiler:
Exception: NameError
Message: undefined local variable or method `ret' for #<PokeBattle_Move_0F4:0x88ea530>
PokeBattle_MoveEffects:6851:in `pbEffectAfterHit'
PokeBattle_Battler:2841:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:3149:in `pbUseMove'
PokeBattle_Battler:3129:in `loop'
PokeBattle_Battler:3152:in `pbUseMove'
PokeBattle_Battler:3348:in `pbProcessTurn'
PokeBattle_Battler:3347:in `logonerr'
PokeBattle_Battler:3347:in `pbProcessTurn'
PokeBattle_Battle:2944:in `pbAttackPhase'
PokeBattle_Battle:2941:in `each'
Message: undefined local variable or method `ret' for #<PokeBattle_Move_0F4:0x88ea530>
PokeBattle_MoveEffects:6851:in `pbEffectAfterHit'
PokeBattle_Battler:2841:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:3149:in `pbUseMove'
PokeBattle_Battler:3129:in `loop'
PokeBattle_Battler:3152:in `pbUseMove'
PokeBattle_Battler:3348:in `pbProcessTurn'
PokeBattle_Battler:3347:in `logonerr'
PokeBattle_Battler:3347:in `pbProcessTurn'
PokeBattle_Battle:2944:in `pbAttackPhase'
PokeBattle_Battle:2941:in `each'
The Game didn't crash, instead the Bug Bite hitted more 6 times, showing this error after the move hit Mega Venusaur, then it stopped using the Move. At first I thought it was happening because it was Mega Evolved and had the Mega Stone attached. So I repeated the battle with a Croconaw with no Items attached, and the error continued.
Has someone faced the same issue and know how to fix it?
I'm using Essentials v16.1 with Elite Battle and Project Generation 6 implemented.
Thanks in advance,
EDIT: A friend of mine (Adre76, Reddit user if you want thank him there xD ) solved the problem. It appears that the class PokeBattle_Move_0F4 < PokeBattle_Move (line 6820) in the PokeBattle_MoveEffects is not good implemented. So you should change that class (lines 6820 - 6853) into this:
Code:
class PokeBattle_Move_0F4 < PokeBattle_Move
def pbEffectAfterHit(attacker,opponent,turneffects)
if !attacker.isFainted? && !opponent.isFainted? && pbIsBerry?(opponent.item) &&
opponent.damagestate.calcdamage>0 && !opponent.damagestate.substitute
if !opponent.hasWorkingAbility(:STICKYHOLD)
item=opponent.item
itemname=PBItems.getName(item)
opponent.pbConsumeItem(false,false)
@battle.pbDisplay(_INTL("{1} stole and ate its target's {2}!",attacker.pbThis,itemname))
if !attacker.hasWorkingAbility(:KLUTZ) &&
attacker.effects[PBEffects::Embargo]==0
attacker.pbActivateBerryEffect(item,false)
end
# Symbiosis
if attacker.item==0 &&
attacker.pbPartner && attacker.pbPartner.hasWorkingAbility(:SYMBIOSIS)
partner=attacker.pbPartner
if partner.item>0 &&
[email protected](partner,partner.item) &&
[email protected](attacker,partner.item)
@battle.pbDisplay(_INTL("{1}'s {2} let it share its {3} with {4}!",
partner.pbThis,PBAbilities.getName(partner.ability),
PBItems.getName(partner.item),attacker.pbThis(true)))
attacker.item=partner.item
partner.item=0
partner.effects[PBEffects::Unburden]=true
attacker.pbBerryCureCheck
end
end
end
end
return 0
end
end
Last edited: