Problems with Arduino Wifi code and RTC

Hi all, I am new to programming arduino but I am trying to write a code that will allow users to change the date with the 'up' and 'dn' buttons and then hit the 'ok' button which will save that date. I want to be able for the arduino to store that date and send a pre-typed sms message on that date to the user but I have not been able t figure that part out. So if anyone has any suggestions they would be greatly appreciated. I continue to get an error message that certain aspects are not declared and everything I do comes back with the same error. I am using an Arduino Uno wifi board with an external RTC. Does anyone know what might be going on with my code?

/*
  LiquidCrystal Library - display() and noDisplay()

 The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

*/

// include the library code:
#include <LiquidCrystal.h>
#include <RTCZero.h>
#include <Time.h>


// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2, upButtonPin = 7, dnButtonPin = 6; okButtonPin = 8;
int upButtonState = 0;
int dnButtonState = 0;
int okButtonState = 0;
int setValue = 10;
RTC_DS3231 rtc; //creates the real-time clock
DateTime now;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

const byte day = 25;
const byte month = 9;
const byte year = 15;

void setup() {
  pinMode(upButtonPin, INPUT);
  pinMode(dnButtonPin, INPUT);
  pinMode(okButtonPin, INPUT); 
  // set up the LCD's number of columns and rows:
  lcd.begin(4, 2);
  // Print a message to the LCD.
  lcd.print("Spoiler Alert");
  delay(2000);
}

void loop() {
  now = rtc.now(); //updates the current time
  updateDisplay();
  delay(500);
  upButtonState = digitalRead(upButtonPin);
  if (upButtonState == HIGH)
  {
    setValue ++;
  }
  dnButtonState=digitalRead(dnButtonPin);
    if (dnButtonState == HIGH)
  {
    setValue --;
  }
  okButtonState=digitalRead(okButtonPin);
    if (okButtonState == HIGH)
  {
    lcd.print(line1);
  }
}

void updateDisplay(){
  	time_t nextMakeTime;

	tm.Second = 0; 
	tm.Hour = 0;
	tm.Minute = 0;
	tm.Day = Day;
	tm.Month = Month;
	tm.Year = Year;   
	
	nextMakeTime =  makeTime(tm); // convert time elements into time_t

	Serial.println(nextMakeTime);   
	Serial.println(day(nextMakeTime));   
	Serial.println(month(nextMakeTime));   
	Serial.println(year(nextMakeTime));   
	delay(3000);
}

Moderator edit: tags

Does anyone know what might be going on with my code?

You do. The compiler told you EXACTLY what was wrong. If you had shared that data, we could help you make the needed changes, so the code would at least compile.

This is the compiler message that I am getting. The day month and year should all be declared through the library but it is not recognizing them. It also says I do not name a type, but I have tried changing all of this but nothing works.

In file included from /tmp/751062712/maddie_date/maddie_date.ino:20:0:

/home/builder/opt/libraries/latest/rtczero_1_5_3/src/RTCZero.h:32:26: error: 'RTC_MODE2_MASK_SEL_OFF_Val' was not declared in this scope

MATCH_OFF = RTC_MODE2_MASK_SEL_OFF_Val, // Never

^

/home/builder/opt/libraries/latest/rtczero_1_5_3/src/RTCZero.h:33:26: error: 'RTC_MODE2_MASK_SEL_SS_Val' was not declared in this scope

MATCH_SS = RTC_MODE2_MASK_SEL_SS_Val, // Every Minute

^

/home/builder/opt/libraries/latest/rtczero_1_5_3/src/RTCZero.h:34:26: error: 'RTC_MODE2_MASK_SEL_MMSS_Val' was not declared in this scope

MATCH_MMSS = RTC_MODE2_MASK_SEL_MMSS_Val, // Every Hour

^

/home/builder/opt/libraries/latest/rtczero_1_5_3/src/RTCZero.h:35:26: error: 'RTC_MODE2_MASK_SEL_HHMMSS_Val' was not declared in this scope

MATCH_HHMMSS = RTC_MODE2_MASK_SEL_HHMMSS_Val, // Every Day

^

/home/builder/opt/libraries/latest/rtczero_1_5_3/src/RTCZero.h:36:26: error: 'RTC_MODE2_MASK_SEL_DDHHMMSS_Val' was not declared in this scope

MATCH_DHHMMSS = RTC_MODE2_MASK_SEL_DDHHMMSS_Val, // Every Month

^

/home/builder/opt/libraries/latest/rtczero_1_5_3/src/RTCZero.h:37:26: error: 'RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val' was not declared in this scope

MATCH_MMDDHHMMSS = RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val, // Every Year

^

/home/builder/opt/libraries/latest/rtczero_1_5_3/src/RTCZero.h:38:26: error: 'RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val' was not declared in this scope

MATCH_YYMMDDHHMMSS = RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val // Once, on a specific date and a specific time

^

/tmp/751062712/maddie_date/maddie_date.ino:26:95: error: 'okButtonPin' does not name a type

/tmp/751062712/maddie_date/maddie_date.ino:31:1: error: 'RTC_DS3231' does not name a type

/tmp/751062712/maddie_date/maddie_date.ino:32:1: error: 'DateTime' does not name a type

/tmp/751062712/maddie_date/maddie_date.ino:35:12: error: 'const byte day' redeclared as different kind of symbol

In file included from /home/builder/opt/libraries/latest/time_1_5_0/Time.h:1:0,

from /tmp/751062712/maddie_date/maddie_date.ino:21:

/home/builder/opt/libraries/latest/time_1_5_0/TimeLib.h:112:9: note: previous declaration 'int day(time_t)'

int day(time_t t); // the day for the given time

^

/tmp/751062712/maddie_date/maddie_date.ino:36:12: error: 'const byte month' redeclared as different kind of symbol

In file included from /home/builder/opt/libraries/latest/time_1_5_0/Time.h:1:0,

from /tmp/751062712/maddie_date/maddie_date.ino:21:

/home/builder/opt/libraries/latest/time_1_5_0/TimeLib.h:116:9: note: previous declaration 'int month(time_t)'

int month(time_t t); // the month for the given time

^

/tmp/751062712/maddie_date/maddie_date.ino:37:12: error: 'const byte year' redeclared as different kind of symbol

In file included from /home/builder/opt/libraries/latest/time_1_5_0/Time.h:1:0,

from /tmp/751062712/maddie_date/maddie_date.ino:21:

/home/builder/opt/libraries/latest/time_1_5_0/TimeLib.h:118:9: note: previous declaration 'int year(time_t)'

int year(time_t t); // the year for the given time

^

/tmp/751062712/maddie_date/maddie_date.ino: In function 'void setup()':

/tmp/751062712/maddie_date/maddie_date.ino:42:11: error: 'okButtonPin' was not declared in this scope

/tmp/751062712/maddie_date/maddie_date.ino: In function 'void loop()':

/tmp/751062712/maddie_date/maddie_date.ino:51:9: error: 'rtc' was not declared in this scope

/tmp/751062712/maddie_date/maddie_date.ino:64:29: error: 'okButtonPin' was not declared in this scope

/tmp/751062712/maddie_date/maddie_date.ino:67:15: error: 'line1' was not declared in this scope

/tmp/751062712/maddie_date/maddie_date.ino: In function 'void updateDisplay()':

/tmp/751062712/maddie_date/maddie_date.ino:74:2: error: 'tm' was not declared in this scope

/tmp/751062712/maddie_date/maddie_date.ino:77:11: error: 'Day' was not declared in this scope

/tmp/751062712/maddie_date/maddie_date.ino:78:13: error: 'Month' was not declared in this scope

/tmp/751062712/maddie_date/maddie_date.ino:79:12: error: 'Year' was not declared in this scope

exit status 1

Post a link to the RTC library you are using. My first thought is that that library is not compatible with the Arduino you are using.