I am getting a ERROR Compilation error: expected unqualified-id before '{' token

C:\Users\azhaa\AppData\Local\Temp.arduinoIDE-unsaved20221023-15776-1g2jenx.09su\sketch_nov23a\sketch_nov23a.ino:212:1: error: expected unqualified-id before '{' token
{
^
C:\Users\azhaa\AppData\Local\Temp.arduinoIDE-unsaved20221023-15776-1g2jenx.09su\sketch_nov23a\sketch_nov23a.ino: In function 'void loop()':
C:\Users\azhaa\AppData\Local\Temp.arduinoIDE-unsaved20221023-15776-1g2jenx.09su\sketch_nov23a\sketch_nov23a.ino:221:6: error: redefinition of 'void loop()'
void loop()
^~~~
C:\Users\azhaa\AppData\Local\Temp.arduinoIDE-unsaved20221023-15776-1g2jenx.09su\sketch_nov23a\sketch_nov23a.ino:12:6: note: 'void loop()' previously defined here
void loop(){
^~~~

exit status 1

Compilation error: expected unqualified-id before '{' token

This my code
pat1t =75;

void setup()
{
for(int i=3; i<=12; i++)
pinMode(i,OUTPUT);
}

void loop(){

for(int i=0; i<=rnd; i++) {
pat1();}
for(int i=0; i<=rnd; i++){
pat2();}
for(int i=0; i<=rnd; i++) {
pat3();}
for(int i=0; i<=rnd; i++) {
pat4();}
for(int i=0; i<=rnd; i++){
pat5();}
for(int i=0; i<=rnd; i++) {
pat6();}
for(int i=0; i<=rnd; i++) {
pat7();}
for(int i=0; i<=rnd; i++) {
pat8();}
for(int i=0; i<=rnd; i++) {
pat9();}

}

void pat1(){
for(int i=3; i<=12; i++) {
digitalWrite(i,HIGH);
delay(pat1t);
digitalWrite(i,LOW);

}

for(int i=11; i>=4; i--) {
  digitalWrite(i,HIGH);
  delay(pat1t);
  digitalWrite(i,LOW);
}

}
void pat2(){
for(int i=3; i<=12; i++) {
digitalWrite(i,HIGH);
digitalWrite(i-1,HIGH);
digitalWrite(i+1,HIGH);
delay(100);
digitalWrite(i,LOW);
digitalWrite(i-1,LOW);
digitalWrite(i+1,LOW);
}

for(int i=11; i>=4; i--) {
  digitalWrite(i,HIGH);
  digitalWrite(i-1,HIGH);
  digitalWrite(i+1,HIGH);
  delay(100);
  digitalWrite(i,LOW);
  digitalWrite(i-1,LOW);
  digitalWrite(i+1,LOW);
}

}
void pat3(){
for(int i=3; i<=12; i=i+2) {
digitalWrite(i,HIGH);
delay(100);
digitalWrite(i,LOW);

}

for(int i=12; i>=3; i=i-2) {
  digitalWrite(i,HIGH);
  delay(100);
  digitalWrite(i,LOW);
}       

}
void pat4(){
for(int i=3; i<=12; i++) {
digitalWrite(i,HIGH);
delay(100);
}

for(int i=12; i>=2; i--) {
  digitalWrite(i,HIGH);
  delay(100);
  digitalWrite(i,LOW);
}

}
void pat5(){
for(int i=3; i<=12; i++) {
digitalWrite(i,HIGH);
}
delay(100);
for(int i=3; i<=12; i++) {
digitalWrite(i,LOW);
}
delay(100);
}
void pat6(){
for(int i=3; i<=8; i++) {
digitalWrite(i,HIGH);
}
for(int i=8; i<=12; i++) {
digitalWrite(i,LOW);
}
delay(200);
for(int i=3; i<=8; i++) {
digitalWrite(i,LOW);
}
for(int i=8; i<=12; i++) {
digitalWrite(i,HIGH);
}
delay(200);
}
void pat7(){
for(int i=3; i<=12; i=i+2) {
digitalWrite(i,HIGH);
}
for(int i=4; i<=12; i=i+2) {
digitalWrite(i,LOW);
}
delay(200);
for(int i=3; i<=12; i=i+2) {
digitalWrite(i,LOW);
}
for(int i=4; i<=12; i=i+2) {
digitalWrite(i,HIGH);
}
delay(200);
}
void pat8(){
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(t);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
delay(t);
digitalWrite(6,HIGH);
digitalWrite(9,HIGH);
delay(t);
digitalWrite(6,LOW);
digitalWrite(9,LOW);
delay(t);
digitalWrite(5,HIGH);
digitalWrite(10,HIGH);
delay(t);
digitalWrite(5,LOW);
digitalWrite(10,LOW);
delay(t);
digitalWrite(4,HIGH);
digitalWrite(11,HIGH);
delay(t);
digitalWrite(4,LOW);
digitalWrite(11,LOW);
delay(t);
digitalWrite(3,HIGH);
digitalWrite(12,HIGH);
delay(t);
digitalWrite(3,LOW);
digitalWrite(12,LOW);
delay(t);
digitalWrite(4,HIGH);
digitalWrite(11,HIGH);
delay(t);
digitalWrite(4,LOW);
digitalWrite(11,LOW);
delay(t);
digitalWrite(5,HIGH);
digitalWrite(10,HIGH);
delay(t);
digitalWrite(5,LOW);
digitalWrite(10,LOW);
delay(t);
digitalWrite(6,HIGH);
digitalWrite(9,HIGH);
delay(t);
digitalWrite(6,LOW);
digitalWrite(9,LOW);
delay(t);
}

void pat9(){
for(int i=3; i<=12; i++) {
digitalWrite(i,HIGH);
}
for(int i=3; i<=12; i++) {
digitalWrite(i,LOW);
delay(100);
digitalWrite(i,HIGH);
}
for(int i=11; i>=4; i--) {
digitalWrite(i,LOW);
delay(100);
digitalWrite(i,HIGH);
}

}
#include <LiquidCrystal.h>

// LCD pins <--> Arduino pins
const int RS = 11, EN = 12, D4 = 2, D5 = 3, D6 = 4, D7 = 5;
LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);

{
lcd.begin(16, 2); // set up number of columns and rows

lcd.setCursor(0, 0); // move cursor to (0, 0)
lcd.print("Arduino"); // print message at (0, 0)
lcd.setCursor(2, 1); // move cursor to (2, 1)
lcd.print("GetStarted.com"); // print message at (2, 1)
}

void loop()
{

}

Welcome to the forum

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

pat1t =75;

void setup(

Not a good start

Did you miss part of your code when you posted it ?

Nor is the fact that you have more than one loop() function in your sketch

#include <LiquidCrystal.h>
// LCD pins <--> Arduino pins
const int RS = 11, EN = 12, D4 = 2, D5 = 3, D6 = 4, D7 = 5;
LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);
{

the above, from near the end of the posted code, looks like the definition of a function, with the open brace.

perhaps this part of the code was included by mistake

You can only have one loop() function in an Arduino sketch, or C/C++ program for that matter.

This second one at the end of your sketch is the error.

Presumably you want to retain the earlier loop() that actually does something; eliminate the second one (last four lines of code) and see different things happening, the definition of progress.

a7