Hi, i;m trying to add in an object randomly but my code isn't working
This is it. What am I doing wrong. It says that it can't find the variable when I try to compile it.
public void act()
{
if (--enemySpawnTimer==0)
{
addObject(newEnemy(), Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));
}
}

