"was not declared in this scope" error

I'm working on a protect and I need for something to turn on at a certain time so i got an RTC module and I cannot figure out how to solve the error. I'm pretty sure it is saying that I am calling the pins (sda and scl) something wrong but I don't know what else to call it.

DS3231  rtc(sda, scl);

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here USING CODE TAGS (</> button on the forum toolbar).

Please post your full sketch.

If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help.

If the sketch is longer than the forum will allow then it's OK to add it as an attachment. If you click the "Reply" button on this forum thread, you will see an "Attachments and other options" button. Don't put your code in some external file service like dropbox, etc. We shouldn't need to go to an external website just to help you.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor then you will not have access to this useful tool. I recommend using the standard Arduino IDE instead.

When your code requires a library that's not included with the Arduino IDE please post a link (using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

Sorry about the wrong format, here is the error.

C:\Users\Zane\Documents\Arduino\sketch_nov23b\sketch_nov23b.ino: In function 'void loop()':

exit status 1
'ADC4' was not declared in this scope

And here is the actual code.

#include <DS3231.h>

int Relay = 4;

DS3231  rtc(sda, scl);
Time t;

const int OnHour = 12;
const int OnMin = 24;
const int OffHour = 12;
const int OffMin = 25;

void setup() {
  Serial.begin(115200);
  rtc.begin();
  pinMode(Relay, OUTPUT);
  digitalWrite(Relay, LOW);
}

void loop() {
  t = rtc.getTime();
  Serial.print(t.hour);
  Serial.print(" hour(s), ");
  Serial.print(t.min);
  Serial.print(" minute(s)");
  Serial.println(" ");
  delay (1000);

  if (t.hour == OnHour && t.min == OnMin) {
    digitalWrite(Relay, HIGH);
    Serial.println("WATER ON");
  }

  else if (t.hour == OffHour && t.min == OffMin) {
    digitalWrite(Relay, LOW);
    Serial.println("WATER OFF");
  }
}

I am using the DS3231 library from the library manager.

The code you posted is NOT the code that gave the error, because ADC4 does not appear anywhere in the loop function.

This won't work, because you failed to define sda and scl (the pin numbers to which you connect the I/O lines):

DS3231  rtc(sda, scl);

I am using the DS3231 library from the library manager.

There are several libraries with this name available through the library manager. Do you mean the first one listed which is DS3231 by Andrew Wickert, Eric Ayres, Jean Claude Wippler.

If so, it does not use this object initiation syntax.

DS3231  rtc(sda, scl);

Please verify which library you are using, and that the posted sketch uses the syntax fro that library.