I`ve a problem. I`m programming a flappy bird game but every time the pipe at the bottom is placed there is an error "n must be positive" and I don`t understand why!
Here is the code (need help)
public void act ()
{
Pipecounter++;
if (Pipecounter % 100 == 0) {
// setze Pipe Object
place = Greenfoot.getRandomNumber((350) - 250);
Pipe pipe = new Pipe();
Pipe2 pipe2 = new Pipe2();
addObject(new Pipe(), getWidth(), 0 - place );
addObject(new Pipe2(), getWidth(), 800 + place );
}



