How to fix "Compilation error: expected initalizer before 'lcd'"?

Hi, I have an issue with a initalizer that annoys me even when I add it. I'm absolute newbie with Arduino so don't mind with it has bilions of errors. Here's the code I wrote:

#include<Wire.h>
#include <LiquidCrystal.h>
int
init() 
LiquidCrystal(int, int, int) lcd(0*27, 16, 2);

void setup() {
  lcd.clear();
  lcd.backlight();
}

void loop() {
lcd.setCursor(2, 0);
lcd.print("Welcome!");
delay(1000);
lcd.clear();

lcd.setCursor(2, 1);
lcd.print("Continue!");;
delay(1000);
lcd.clear();
}

Help me, please!

Post the verbose compile log in code tags. But first maybe explain/fix this
Screenshot 2025-12-28 at 13.14.32

Check to see if the library came with examples.

I question this:

LiquidCrystal(int, int, int) lcd(0*27, 16, 2);

You did not see that in any code you may have looked at for help with your display.

What exact library are you using?

How is your display wired?

I ask because getting this to compile is your current issue, but the next thing you'll want to know is why it isn't working. Sry, I am a pessimist and also never get LCDs to work first time.

a7

The compiler minds. You should too. If you're getting lots of errors with the compiler warning level set to the usual 'none', imagine how many you'd get if you had it set to 'all'...

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

Your sketch still won't work, but it will compile.

Where is lcd.begin(16, 2);?

The asterisk should be an "x" to indicate hexadecimal.

0x27, 16, 2 ... (address in hexadecimal, columns, rows)

EXACTLY @alto777

@korek21