error code

LiquidCrystal lcd(1, 2, 4, 5, 6, 7,);

Getting error code

expected-primary expression before ')' token

You have an extra , at the end there.

To help yourself, try compiling some of the examples for the library you are using.

If they compile OK, then assume there is some problem with the line;

LiquidCrystal lcd(1, 2, 4, 5, 6, 7,);

So does that same line in the examples (that complie OK) look the same as the line in your code ?

used library to include lcd and I get the following error message can you please help.

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch_oct25d:3:37: error: expected primary-expression before ')' token

LiquidCrystal lcd (1, 2, 4, 5, 6, 7,);

^

exit status 1
expected primary-expression before ')' token

Invalid library found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a: no headers files (.h) found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a
Invalid library found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a: no headers files (.h) found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

You have a trialing comma after the 7 and before the closing paren. Either you need another parameter or remove the comma.

Already asked and answered here:

Threads merged.

On a number of Arduinos, it's advisable not to use pins 0 and 1 as they are also used for serial communication.

This applies to e.g. the 328P (uno, nano, ...) and 2560 (mega) based boards.

Dillon42:
Invalid library found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a: no headers files (.h) found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a
Invalid library found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a: no headers files (.h) found in C:\Users\jaydi\OneDrive\Documents\Arduino\libraries\sketch_oct23a

Looks like a sketch named sketch_oct23a got accidentally dragged from Documents\Arduino\ to Documents\Arduino\libraries. You should drag it back out to Documents\Arduino.