the code resulting in this error isto be more specific its the if statement in this code. the goal of this code it to get the actor to fire at random speeds however the values for this code are in the world class, where this actor is. it is affected with both positive and negative numbers causing this error to appear.
if(Greenfoot.getRandomNumber(Math.abs(fireRate)) ==1)
{
u_Lazer u_Lazer = new u_Lazer();
getWorld().addObject(u_Lazer, getX()-40, getY());
Greenfoot.playSound("shot.wav");
}