• 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] Problematic move

  • 163
    Posts
    6
    Years
    [Pokémon Essentials version 17.2]
    Exception: ArgumentError
    Message: wrong number of arguments(0 for 1)
    PokeBattle_MoveEffects:1273:in `pbAttract'
    PokeBattle_MoveEffects:1273:in `pbAdditionalEffect'
    PokeBattle_Battler:2781:in `pbProcessMoveAgainstTarget'
    PokeBattle_Battler:2706:in `each'
    PokeBattle_Battler:2706:in `pbProcessMoveAgainstTarget'
    PokeBattle_Battler:3182:in `pbUseMove'
    PokeBattle_Battler:3162:in `loop'
    PokeBattle_Battler:3185:in `pbUseMove'
    PokeBattle_Battler:3385:in `pbProcessTurn'
    PokeBattle_Battler:3384:in `logonerr'

    It's for a move called Heartstring Tug. It damages the target but also makes them fall in love. But all I get is this error when the effect happens.

    Please help! :(

    Here's the code for Heartstring Tug's function code BTW:
    ################################################################################
    # May cause the target to become infactuated. (Heartstring Tug)
    ################################################################################
    class PokeBattle_Move_159 < PokeBattle_Move
    def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    return super(attacker,opponent,hitnum,alltargets,showanimation) if pbIsDamaging?
    if opponent.pbCanAttract?(attacker)
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    opponent.pbAttract
    @battle.pbDisplay(_INTL("{1} fell in love!",opponent.pbThis))
    return 0
    end
    return -1
    end

    def pbAdditionalEffect(attacker,opponent)
    return if opponent.damagestate.substitute
    if opponent.pbCanAttract?(attacker)
    opponent.pbAttract
    @battle.pbDisplay(_INTL("{1} fell in love!",opponent.pbThis))
    end
    end
    end
     
    Back
    Top