Noob question (LCD Tutorial)

Hey guys,

I'm sure you guys can help me, I am currently doing the freenove tutorial bundle. I have never programmed before so please go easy with me.

I have 2 counters on the LCD screen and I want pin 8 or any other free digital pin to go high when a counter has reached a certain number.

I have placed the lcd counter in a variable and I guess my logic points to a "if" statement.

Please see my code below. I am currently getting the error " invalid operands of types '' and 'int' to binary 'operator>'

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
#define ledPin 8
int ledon = 30;
#define counter1 lcd.print
void setup() {
  pinMode (ledPin, OUTPUT);
  lcd.begin(16,2);

  
}

void loop() {
 lcd.setCursor(0,1);
 lcd.print("Counter ");
  counter1(millis() / 1000);
 lcd.setCursor(0,0);
 lcd.print("Counter ");
 lcd.print(millis() /0000.4);
if (counter1 > 30)
    digitalWrite(ledPin, HIGH);

}

Because of your #define for counter1 this line

  if (counter1 > 30)

becomes

  if (lcd.print > 30)

after the compiler pre-processing, hence the error

Thanks for your response. I understand that. How would I move the data? Again just looking for a starting point to look.

I would start by getting rid of
#define counter1 lcd.printand just using lcd.print() when printing to the LCD.