compilation errors

I copied this sketch from Web. All wiring is correct See copy of errors reported. What am I doing incorrectly?
Arduino: 1.8.0 (Windows 10), Board: “Arduino Nano, ATmega328P”

C:\Users\papap\OneDrive\Documents\Arduino\count_down_timer_20_x_4__2-13-18\count_down_timer_20_x_4__2-13-18.ino: In function ‘void setup()’:

count_down_timer_20_x_4__2-13-18:13: error: ‘lcd’ was not declared in this scope

lcd.begin(16, 2); //set up the LCD’s number of columns and rows

^

C:\Users\papap\OneDrive\Documents\Arduino\count_down_timer_20_x_4__2-13-18\count_down_timer_20_x_4__2-13-18.ino: In function ‘void loop()’:

count_down_timer_20_x_4__2-13-18:17: error: ‘lcd’ was not declared in this scope

lcd.setCursor(1, 0);

^

Multiple libraries were found for “LiquidCrystal.h”
Used: C:\Users\papap\OneDrive\Documents\Arduino\libraries\LiquidCrystal
Not used: C:\Users\papap\OneDrive\Documents\Arduino\libraries\NewliquidCrystal
Not used: C:\Program Files (x86)\Arduino\libraries\LiquidCrystal
exit status 1
‘lcd’ was not declared in this scope//void setup() {
// put your setup code here, to run once:

//}

void loop() {
// put your main code here, to run repeatedly:

}

/*Created by Yvan / https://Brainy-Bits.com
This code is in the public domain…
You can: copy it, use it, modify it, share it or just plain ignore it!
Thx!

*/

#define Max7219DIN 7 // Pin 7 connected to DIN (DataIN)
#define Max7219CLK 6 // Pin 6 connected to CLK
#define Max7219CS 5 // Pin 5 connected to CS

#define Buzzer 8 // Pin 8 connected to Buzzer +positive pin
int BuzzTrigger=0; // Variable to store buzzer trigger value

#include “LedControl.h” // LedControl Library created by Eberhard Fahle at http://playground.arduino.cc/Main/LedControl

LedControl lc=LedControl(Max7219DIN,Max7219CLK,Max7219CS,1); // Last number represent the number of Max7219 Modules connected

long int countnumber=24001000 ; // Countdown timer start value HH:MM:SSSS

// Variables to store individual numbers
int firstnum=0;
int secondnum=0;
int thirdnum=0;
int fournum=0;
int fivenum=0;
int sixnum=0;
int sevennum=0;
int eightnum=0;

void setup() {
lc.shutdown(0,false); // Wake up the display
lc.setIntensity(0,7); // Set Brightness 0-15
lc.clearDisplay(0); // Clear display
pinMode(Buzzer, OUTPUT);
digitalWrite(Buzzer, LOW); //Buzzer Off at startup

}

/*void loop() {

for (countnumber; countnumber != -1; countnumber --)
{
String mystring = String(countnumber); // Transform Counter Int to String for manipulation

// Convert number to a time value
for (int z = 0; z < 6; z++){

if ( mystring.substring(z) == “999999” ) {
countnumber = (countnumber - 400000);
}

if ( mystring.substring(z) == “9999” ) {
countnumber = (countnumber - 4000);
}
}*/

// Display number on Display depending on number of digits remaining
if (countnumber > 9999999) {
firstnum = ((countnumber/10000000)%10);
secondnum = countnumber/1000000%10;
thirdnum = countnumber/100000%10;
fournum = countnumber/10000%10;
fivenum = countnumber/1000%10;
sixnum = countnumber/100%10;
sevennum = countnumber/10%10;
eightnum = countnumber%10;

lc.setDigit(0,7,firstnum,false);
lc.setDigit(0,6,secondnum,false);
lc.setDigit(0,5,thirdnum,false);
lc.setDigit(0,4,fournum,false);
lc.setDigit(0,3,fivenum,false);
lc.setDigit(0,2,sixnum,false);
lc.setDigit(0,1,sevennum,false);
lc.setDigit(0,0,eightnum,false);
}
else {
if (countnumber > 999999) {
// firstnum = ((countnumber/10000000)%10);
secondnum = countnumber/1000000%10;
thirdnum = countnumber/100000%10;
fournum = countnumber/10000%10;
fivenum = countnumber/1000%10;
sixnum = countnumber/100%10;
sevennum = countnumber/10%10;
eightnum = countnumber%10;

lc.setChar(0,7,’-’,false);
lc.setDigit(0,6,secondnum,false);
lc.setDigit(0,5,thirdnum,false);
lc.setDigit(0,4,fournum,false);
lc.setDigit(0,3,fivenum,false);
lc.setDigit(0,2,sixnum,false);
lc.setDigit(0,1,sevennum,false);
lc.setDigit(0,0,eightnum,false);
}
else {
if (countnumber > 99999) {
// firstnum = ((countnumber/10000000)%10);
// secondnum = countnumber/1000000%10;
thirdnum = countnumber/100000%10;
fournum = countnumber/10000%10;
fivenum = countnumber/1000%10;
sixnum = countnumber/100%10;
sevennum = countnumber/10%10;
eightnum = countnumber%10;

lc.setChar(0,7,’-’,false);
lc.setChar(0,6,’-’,false);
lc.setDigit(0,5,thirdnum,false);
lc.setDigit(0,4,fournum,false);
lc.setDigit(0,3,fivenum,false);
lc.setDigit(0,2,sixnum,false);
lc.setDigit(0,1,sevennum,false);
lc.setDigit(0,0,eightnum,false);
}
else {
if (countnumber > 9999) {
// firstnum = ((countnumber/10000000)%10);
// secondnum = countnumber/1000000%10;
// thirdnum = countnumber/100000%10;
fournum = countnumber/10000%10;
fivenum = countnumber/1000%10;
sixnum = countnumber/100%10;
sevennum = countnumber/10%10;
eightnum = countnumber%10;

lc.setChar(0,7,’-’,false);
lc.setChar(0,6,’-’,false);
lc.setChar(0,5,’-’,false);
lc.setDigit(0,4,fournum,false);
lc.setDigit(0,3,fivenum,false);
lc.setDigit(0,2,sixnum,false);
lc.setDigit(0,1,sevennum,false);
lc.setDigit(0,0,eightnum,false);
}
else {
if (countnumber > 999) {
// firstnum = ((countnumber/10000000)%10);
// secondnum = countnumber/1000000%10;
// thirdnum = countnumber/100000%10;
// fournum = countnumber/10000%10;
fivenum = countnumber/1000%10;
sixnum = countnumber/100%10;
sevennum = countnumber/10%10;
eightnum = countnumber%10;

lc.setChar(0,7,’-’,false);
lc.setChar(0,6,’-’,false);
lc.setChar(0,5,’-’,false);
lc.setChar(0,4,’-’,false);
lc.setDigit(0,3,fivenum,false);
lc.setDigit(0,2,sixnum,false);
lc.setDigit(0,1,sevennum,false);
lc.setDigit(0,0,eightnum,false);
}
else {
// firstnum = ((countnumber/10000000)%10);
// secondnum = countnumber/1000000%10;
// thirdnum = countnumber/100000%10;
// fournum = countnumber/10000%10;
// fivenum = countnumber/1000%10;
sixnum = countnumber/100%10;
sevennum = countnumber/10%10;
eightnum = countnumber%10;

lc.setChar(0,7,’-’,false);
lc.setChar(0,6,’-’,false);
lc.setChar(0,5,’-’,false);
lc.setChar(0,4,’-’,false);
lc.setChar(0,3,’-’,false);
lc.setDigit(0,2,sixnum,false);
lc.setDigit(0,1,sevennum,false);
lc.setDigit(0,0,eightnum,false);
}

}
}
}
}

// If one second as gone by sound buzzer
if (BuzzTrigger == 99){
digitalWrite (Buzzer, HIGH) ;// Buzzer On
delay (9) ;// Delay 2ms
digitalWrite (Buzzer, LOW) ;// Buzzer Off
BuzzTrigger = 0; // Trigger for countdown sound
}
else {
delay (9);
BuzzTrigger = BuzzTrigger + 1;
}

// If countdown at zero sound alarm and flash display
if (countnumber == 0) {
for (int y = 0; y < 8; y++){
digitalWrite (Buzzer, HIGH) ;// Buzzer On
for (int x = 0; x < 8; x++)
{
lc.setDigit(0,x,0,false);
}
delay (100) ;// Delay 1ms
digitalWrite (Buzzer, LOW) ;// Buzzer Off
for (int x = 0; x < 8; x++)
{
lc.setChar(0,x,’-’,false);
}
delay (300) ;// delay 1ms
}
}
}
}

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

arteegee:
What am I doing incorrectly?

Sorry, but your post is a complete mess… looks like you joined together several things and pasted 'em into the message editor, can’t figure it out.

Post your code between code tags, use the </> button on the message editor.

If the original code is somewhere on the web, post a link to it please.

Yours,
TonyWilk

Sorry that I made a mess of this post, Tony. I’ll get it together shortly and repost. You can see that I’m not accustomed to the presentation, to say the least. That goes for the </> reference also; what does that mean?

arteegee:
That goes for the </> reference also; what does that mean?

Go look at the top of any of the boards for a thread called “How to use this forum - please read” and you will learn everything you need to know about how to get the most out of this site.

That’s sage advise for anything you do in this hobby. Always try to find the instructions and read them first. That will solve 99% of the problems you ever face in programming.

Thank you…glad you can’t see my red face.

Also note the edit key on top of your post. It is not too late to clean up your original post.

Also your error

'lcd' was not declared in this scope

Means you have not included a libiary, or the libiary has not been installed correctly.

Created by Yvan / https://Brainy-Bits.com

People have no shame, that is a very crap piece of code done by someone with little idea of how to program.

Now that Mike has given his opinion of the expertise of the person who wrote this code, I'll give up on this one and hunt for a sketch that I can handle, or at least that I can explain properly to the Forum. Thanks for everyone's patience. See you down the road.