• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

undefined method `pbGetPokemon'

  • 752
    Posts
    14
    Years
    • UK
    • Seen Dec 29, 2024
    I'm getting the following error

    Message: Section157:115:in `pbGTS'undefined method `pbGetPokemon' for #<GTSScene:0xa515200>

    Within a custom script i'm trying to make

    This is the code i've got

    Code:
    pbChoosePokemon(1,3)
              if $game_variables[1] < 0
                break
              end
              if (pbGetPokemon(1).species == 25) && (pbGetPokemon(1).form == 1)
                Kernel.pbMessage("This Pokemon cannot currently be offered")
                break
              end
     
    I'm not sure, but I think the code should be:
    Spoiler:

    But again, I'm not sure
     
    That method is only usable from within events.

    You could use this instead:

    Code:
    pbChoosePokemon(1,3,proc {|poke|
       !(isConst?(poke,PBSpecies,:PIKACHU) && poke.form==1)
    })
    break if pbGet(1)<0
    It won't let the player choose a form 1 Pikachu in the first place.
     
    This, then.
    Code:
    pbChoosePokemon(1,3,proc {|poke|
       !(isConst?(poke.species,PBSpecies,:PIKACHU) && poke.form==1)
    })
    break if pbGet(1)<0
     
    Back
    Top