The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Register New Account FAQ/Rules Chat 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  
Unread January 29th, 2013, 04:24 PM
desbrina's Avatar
desbrina
Lightning Yellow Creator
 
Join Date: Feb 2011
Location: UK
Age: 24
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.

Current Give-away: None
Dates: Unknown

If your reporting a problem, please make sure you're using the latest version first. Please post the full error message if there is one, as well as what you were doing/did so that i can recreate it

Reply With Quote
  #2  
Unread January 29th, 2013, 04:59 PM
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  
Unread January 29th, 2013, 10:38 PM
desbrina's Avatar
desbrina
Lightning Yellow Creator
 
Join Date: Feb 2011
Location: UK
Age: 24
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.

Current Give-away: None
Dates: Unknown

If your reporting a problem, please make sure you're using the latest version first. Please post the full error message if there is one, as well as what you were doing/did so that i can recreate it

Reply With Quote
  #4  
Unread January 29th, 2013, 11:36 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
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  
Unread January 29th, 2013, 11:44 PM
desbrina's Avatar
desbrina
Lightning Yellow Creator
 
Join Date: Feb 2011
Location: UK
Age: 24
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.

Current Give-away: None
Dates: Unknown

If your reporting a problem, please make sure you're using the latest version first. Please post the full error message if there is one, as well as what you were doing/did so that i can recreate it

Reply With Quote
  #6  
Unread January 29th, 2013, 11:59 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
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

Forum Jump


All times are UTC. The time now is 12:36 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 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 posts belong to the user.