The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old January 29th, 2013, 08:24 AM
desbrina's Avatar
desbrina
Lightning Yellow Creator
 
Join Date: Feb 2011
Location: UK
Age: 26
Gender: Female
Nature: Quiet
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
__________________
Creator of


A Pokemon Yellow remake, using HGSS Tiles, and the ability to obtain all Kanto Pokemon as well as their previous/later evolutions.

Reply With Quote
  #2    
Old January 29th, 2013, 08:59 AM
macrpg's Avatar
macrpg
Unhatched Egg
 
Join Date: Jan 2011
Gender: Male
I'm not sure, but I think the code should be:
Spoiler:

pbChoosePokemon(1,3)
if $gamevariable[1] < 0
break
end
poke=PbGetPokemon(1)
If (poke.species ==25) && (poke.form==1)
Kernel.pbMessage ("This Pokémon can't be offered")
break
end

But again, I'm not sure
Reply With Quote
  #3    
Old January 29th, 2013, 02:38 PM
desbrina's Avatar
desbrina
Lightning Yellow Creator
 
Join Date: Feb 2011
Location: UK
Age: 26
Gender: Female
Nature: Quiet
nope, still gives the undefined method
__________________
Creator of


A Pokemon Yellow remake, using HGSS Tiles, and the ability to obtain all Kanto Pokemon as well as their previous/later evolutions.

Reply With Quote
  #4    
Old January 29th, 2013, 03:36 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
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.
__________________
Reply With Quote
  #5    
Old January 29th, 2013, 03:44 PM
desbrina's Avatar
desbrina
Lightning Yellow Creator
 
Join Date: Feb 2011
Location: UK
Age: 26
Gender: Female
Nature: Quiet
Thats not erroring but it is allowing me to select a form 1 pikachu
__________________
Creator of


A Pokemon Yellow remake, using HGSS Tiles, and the ability to obtain all Kanto Pokemon as well as their previous/later evolutions.

Reply With Quote
  #6    
Old January 29th, 2013, 03:59 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
This, then.
Code:
pbChoosePokemon(1,3,proc {|poke|
   !(isConst?(poke.species,PBSpecies,:PIKACHU) && poke.form==1)
})
break if pbGet(1)<0
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:17 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.