When you added code to pbCompileTrainers to allow for a 16th value, did you add a line saying poke=poke.to_i? You need to turn it into an integer.
Also, the code you mentioned is wrong. Use this:
if poke > 0 && poke <= 100
pokemon.hp = (pokemon.totalhp * poke / 100).floor