//Make sure that value isn't negative.
if (expTillLvl < 0){
expTillLvl = 0;
}
TcpProtocolHandler.writeMessage(m_player.getTcpSession(),
new BattleExpMessage(p.getSpeciesName(), exp, expTillLvl));
String expGain = exp + "";
expGain = expGain.substring(0, expGain.indexOf('.'));
m_player.getTcpSession().write("Pe" + index + expGain);