• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Error] Z-Move Error

  • 68
    Posts
    5
    Years
    • Seen Nov 9, 2023
    For some reason, whenever my opponent uses Breakneck Blitz, this error occurs.
    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: ArgumentError

    Message: wrong number of arguments(1 for 0)

    PokeBattle_Battler:2009:in `isContactMove?'

    PokeBattle_Battler:2009:in `pbEffectsOnDealingDamage'

    PokeBattle_Battler:3726:in `pbProcessMoveAgainstTarget'

    PokeBattle_Battler:3637:in `each'

    PokeBattle_Battler:3637:in `pbProcessMoveAgainstTarget'

    PokeBattle_ZMoves:80:in `initialize'

    PokeBattle_Battle:1838:in `new'

    PokeBattle_Battle:1838:in `pbUseZMove'

    PokeBattle_Battler:4427:in `pbProcessTurn'

    PokeBattle_Battle:2963:in `pbAttackPhase'



    This exception was logged in

    C:\Users\Kids\Saved Games\Pokemon Essentials\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------


    Does anyone know how to fix this? I really need help with this one.
     
    Code:
    Message: wrong number of arguments(1 for 0)
    PokeBattle_Battler:2009:in `isContactMove?'
    On line 2009 of PokeBattle_Battler is a call to isContactMove? but it passes the wrong number of arguments—I can't remember if it's saying there should be 1 but are 0 or vice-versa, but it should be pretty obvious if you look at that line.

    The bug is probably that isContactMove? is defined with a different number of parameters for Breakneck Blitz and all other moves, so I'd recommend Ctrl+Shift-F to search for "def isContactMove?" and compare the definitions.
     
    Last edited:
    I have exactly the same error. I did what mgriffin said but I don't understand it completly... so the error is still there.

    Also, I have this other error when I use Z moves with moves like growl, sand attack (reduce stats).

    Spoiler:


    I'm new with all this coding stuff and I don't know exactly what to do.

    Thanks for your help.

    --------------------------------------
    EDIT 1: Ok, I found the fix for my error with stats moves. Only needs this:

    --Update--
    Ok it works to change all
    zchoice[2].name = @name
    into
    @name = zchoice[2].name
    and all
    @oldmove.name = @oldname
    into
    @oldname = @oldmove.name

    Credits to MillaLya in the Z-Move Add On thread.

    ----------------------------------------------------------

    EDIT 2: Somehow I fixed up the first error!

    In the Z-Moves Script, around line 535, add the red part into your code.

    def isContactMove?(attacker=nil)
    return false if (attacker && attacker.hasWorkingAbility(:LONGREACH))

    return @flags.include?("a")
    end
     
    Last edited:
    Back
    Top