Error with IF

Hello everyone, i'm trying to validate this code but it keeps me sending the error on the first IF where's
If digitalRead (bottone == HIGH) { ...

it keeps saying
exit status 1
expected unqualified-id before 'if'

does anyone can help me?
I don't expect all the cod is written good, but help me on this first problem here...
sorry for reposting the same thing..

void loop() {
  if (mossa != 0) {
    mincorso = mossa;
  }
}

if digitalRead (bottone == HIGH) {
  {
    if (mincorso > 2 {mincorso = 0;}
    if (mincorso == 0) {
      mossa1();
      }
      else if (mincorso == 1) {
      mossa2();
      }
    if (mossa == 0) {
    mincorso++;
  }
}
else {
  servo1.write (0);
    servo2.write (0);
  }
}

if digitalRead (bottone, HIGH) {Check the syntax of the digitalRead() function

Also, look at your pairing of braces { }

Your {}'s are wrong.

You have the loop() {} function closed, so that if statement is sitting outside of a function.

That is not valid C syntax - all code must be inside a function.

Also, "if" is not a "function". https://www.arduino.cc/en/Reference/FunctionDeclaration

Thanks, it was a problem of syntax with {}
Thanks for the help, much appreciated :heart:

UKHeliBob:
if digitalRead (bottone, HIGH) {Check the syntax of the digitalRead() function

You might want to take a peak, yourself. 8)

You might want to take a peak, yourself. 8)

Sorry, I am not seeing it.

Maybe I have peaked too early. :confused:

First, how many arguments does digitalRead() take?

Second, how many parentheses are used in an if statement?

Third, who mangled my spelling of peek? Stupid Microsoft crap. 8). That's my story, and I'm sticking to it!