• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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] Making an event pokemon, this happened

  • 8
    Posts
    3
    Years
    • Seen Dec 25, 2023
    So, was making a event pokemon as title says, something for the trainer to challenge after going through the area as sort of an elite foe. So, I looked at the various scripts, at Mew and Deoxys, looked up how to make an event pokemon with its own move list, and went with this;

    p=Pokemon.new(:INFERNAPE,20, $Trainer)
    p.pbLearnMove(:FIREPUNCH)
    p.pbLearnMove(:POWERUPPUNCH)
    p.pbLearnMove(:SLACKOFF)
    p.pbLearnMove(:AERIALACE)
    p.calcStats
    Kernel.pbWildBattle(p)


    However, thats when I get the argument error, that I gave the wrong number of arguments, 1 instead of 2,,5

    Not entirely sure whats happening, but would appreciate the help, as I be new to coding in general.
     
    So... think I fixed the first error, only to get this;

    Exception `NoMethodError' at (eval):2 - undefined method `Pokemon' for #<Pokemon INFERNAPE Lv.20>
    Exception `RuntimeError' at 033:Interpreter:189 - Script error in event 1 (coords 9,4), map 92 (Sun's Court):
    Exception: NoMethodError
    Message: undefined method `Pokemon' for #<Pokemon INFERNAPE Lv.20>

    ***Full script:
    p=Pokemon.new(:INFERNAPE,20)
    p.Pokemon#learn_move(:FIREPUNCH)
    p.Pokemon#learn_move(:POWERUPPUNCH)
    p.Pokemon#learn_move(:SLACKOFF)
    p.Pokemon#learn_move(:AERIALACE)
    p.Pokemon#calc_stats
    Kernel.pbWildBattle(p)


    Backtrace:
    (eval):2:in `execute_script'
    033:Interpreter:137:in `eval'
    033:Interpreter:137:in `execute_script'
    034:Interpreter_Commands:1030:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:127:in `block in update'
    033:Interpreter:87:in `loop'
    033:Interpreter:87:in `update'
    032:Scene_Map:157:in `block in update'
    032:Scene_Map:155:in `loop'
     
    Back
    Top