View Single Post
Old December 16th, 2012 (4:52 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Join Date: Jan 2008
Location: England
Posts: 5,171
When you added code to pbCompileTrainers to allow for a 16th value, did you add a line saying poke[16]=poke[16].to_i? You need to turn it into an integer.

Also, the code you mentioned is wrong. Use this:

if poke[16] > 0 && poke[16] <= 100
  pokemon.hp = (pokemon.totalhp * poke[16] / 100).floor
At least you put it in the right place.
Go to the Pokémon Essentials Wiki

| Downloads | Tutorials | Fangames |
| All Animations Project |

Follow me on Twitter: @maruno42

Reply With Quote