expecting EOF, found 'if'

I have an if statement out of void draw like this

void draw() {
  //
}

if (mouseX > width/2-55 && mouseX < width/2-5 && mouseY > 335 && mouseY < 385 && mousePressed) {
  println("asdf");
}

When ever I run, it highlights the if statement and returns that error message in the title.

Tagged:

Answers

Sign In or Register to comment.