Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Reload this Page [Question] Error when adding a new Pokeball Type

Notices
For all updates, view the main page.

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 March 17th, 2013 (04:47 PM). Edited March 17th, 2013 by Rayd12smitty.
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Posts: 647
Hello again PC.

I am trying to add a few new simple pokeball types to my game. They are really simple and only make pokemon of a certain type easier to catch.

So, I did everything on the wiki. I added the item to the PBS file "items.txt" and then I opened the script called pokemonballs. I started by just adding 3 of them. One that makes normal type pokemon 4x easier to catch, one for rock types, and one for water types. So, I added the new ball types in the list which now looks like this:

Code:
################################

$BallTypes={
   0=>:POKEBALL,
   1=>:GREATBALL,
   2=>:SAFARIBALL,
   3=>:ULTRABALL,
   4=>:MASTERBALL,
   5=>:NETBALL,
   6=>:DIVEBALL,
   7=>:NESTBALL,
   8=>:REPEATBALL,
   9=>:TIMERBALL,
   10=>:LUXURYBALL,
   11=>:PREMIERBALL,
   12=>:DUSKBALL,
   13=>:HEALBALL,
   14=>:QUICKBALL,
   15=>:CHERISHBALL,
   16=>:FASTBALL,
   17=>:LEVELBALL,
   18=>:LUREBALL,
   19=>:HEAVYBALL,
   20=>:LOVEBALL,
   21=>:FRIENDBALL,
   22=>:MOONBALL,
   23=>:SPORTBALL
   24=>:NORMALBALL
   25=>:ROCKBALL
   26=>:WATERBALL
}
Starts with line 51 and ends with line 81. (Sorry for my unoriginal ball names)

Then, I added this to the bottom of the script:

Code:
BallHandlers::ModifyCatchRate.add(:NORMALBALL,proc{|ball,catchRate,battle,battler|
   catchRate*=4 if battler.pbHasType?(:NORMAL)
   next catchRate
})

BallHandlers::ModifyCatchRate.add(:ROCKBALL,proc{|ball,catchRate,battle,battler|
   catchRate*=4 if battler.pbHasType?(:ROCK)
   next catchRate
})

BallHandlers::ModifyCatchRate.add(:WATERBALL,proc{|ball,catchRate,battle,battler|
   catchRate*=4 if battler.pbHasType?(:WATER)
   next catchRate
})
Everything seems fine, but when I start the game I get this error:

Code:
---------------------------
Pokémon Melanite
---------------------------
Script 'PokemonBalls' line 78: SyntaxError occurred.
---------------------------
OK   
---------------------------
The line it is reffering to is the line in the list of pokeballs that says

Code:
24=>:NORMALBALL
I don't know what I did wrong, or if this is a problem with essentials. Can someone point me in the right direction


I have not added graphics for the new pokeballs yet. Could that be causing the error?

EDIT: I added pictures so that isn't the problem
EDIT 2:
I don't need this anymore. Luka pointed out I'm missing commas XD. I gotta pay closer attention to my scripts
__________________
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 -8. The time now is 04:33 AM.