• 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!
  • 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] Every battle instantly crashes, what does "Given 2 arguments and expected 0" mean?

  • 428
    Posts
    5
    Years
    Hi, this is the error message and I have no idea what it means. I get this error message whether I try battling the default NPC "Camper Liam" that came with Pokemon Essentials or the default NPC "Brock".

    Code:
    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.2]
    
    Script error in event 23 (coords 26,8), map 3 (Player's house)
    Exception: ArgumentError
    Message: wrong number of arguments (given 2, expected 0)
    
    ***Full script:
    TrainerBattle.start(:CAMPER, "Liam")
    Backtrace:
    172:Battle_Move:59:in `initialize'
    172:Battle_Move:59:in `new'
    172:Battle_Move:59:in `from_pokemon_move'
    161:Battler_Initialize:89:in `block in pbInitPokemon'
    161:Battler_Initialize:88:in `each'
    161:Battler_Initialize:88:in `each_with_index'
    161:Battler_Initialize:88:in `pbInitPokemon'
    267:ShadowPokemon_Other:196:in `pbInitPokemon'
    161:Battler_Initialize:61:in `pbInitialize'
    148:Battle_StartAndEnd:117:in `pbCreateBattler'

    This is his script, and it should work.

    Code:
    TrainerBattle.start(:CAMPER, "Liam")

    And that's all there is to his code. No matter what battler NPC I talk to, the game immediately crashes.

    edit: Found a new error message!

    Code:
    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.2]
    
    Script error in event 5 (coords 27,4), map 3 (Aaa's house)
    Exception: NameError
    Message: wrong constant name Battle::Move::
    
    ***Full script:
    TrainerBattle.start(:LEADER_Brock, "Brock")
    Backtrace:
    172:Battle_Move:58:in `const_defined?'
    172:Battle_Move:58:in `from_pokemon_move'
    161:Battler_Initialize:89:in `block in pbInitPokemon'
    161:Battler_Initialize:88:in `each'
    161:Battler_Initialize:88:in `each_with_index'
    161:Battler_Initialize:88:in `pbInitPokemon'
    267:ShadowPokemon_Other:196:in `pbInitPokemon'
    161:Battler_Initialize:61:in `pbInitialize'
    148:Battle_StartAndEnd:117:in `pbCreateBattler'
    148:Battle_StartAndEnd:153:in `block (3 levels) in pbSetUpSides'
     
    Last edited:
    Back
    Top