See previous response. After the setup function is a final brace that ends the class.

setup() {
.... bla bla bla
}
}

You have probably deleted the final brace.