Several Things at once problem

Hi. I'm trying to do a a several things at the same time code by following the code here written by Robin2. I'm going a step at a time to make it easier to learn so I haven't entered the millis parts yet.
I did a test compile and I cannot for the life of me figure out why I'm getting this error. Can someone please just point out what I'm doing wrong with the line; void updateRelayAction2(); Someone please help.

int ldrPin = A1;
int RELAY1 = 2;
int RELAY2 = 3;



void setup() {

  pinMode(A0, INPUT);     //Ldr input
  pinMode(2, OUTPUT);    //LEDs
  pinMode(3, OUTPUT);
  byte RelayAction1 = LOW;           //   LOW = off
  byte RelayAction2 = LOW;
  int ldrState = analogRead(ldrPin);
}

void loop() {
  updateRelayAction1();  
  updateRelayAction2();
}
void updateRelayAction1() {
  If (ldrState >= 200) {
    digitalWrite(RELAY1,  HIGH;)
  }
void updateRelayAction2() {

    digitalWrite (RELAY2, HIGH);

  }

Please don't post pictures of text. That is very unhelpful. When you encounter an error you'll see a button on the right side of the orange bar in the Arduino IDE "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button. In a message here, click the code tags button (</> on the forum toolbar) and then paste the error.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.


You have a lot of problems with your code:

Missing closing brace. A very helpful troubleshooting tool is the Auto Format feature (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor). If you do an Auto Format and then compare the resulting indentation to your intended program structure, it will quickly point you to where there is a missing or extra brace.

Another useful feature of the Arduino IDE/Arduino Web Editor is that when you place the cursor next to one bracket, it puts a box around the matching bracket. In the Arduino IDE, if the cursor is next to the closing bracket and the opening bracket is off the screen then it will show the opening bracket line in a tool tip after a short delay.

Incorrect case. Arduino programming language is case sensitive If != if.

Misplaced semicolon.

Thanks. Seems I have a long way to go.

I did find all my problems. Just have to step back and rest my eyes for a moment. Thanks again

You're welcome. I'm glad to hear you found all the problems. Enjoy!
Per