Problem with code

Hi, I'm trying to do something when I give it 5 volts to let the LED light up and the column to sound, but I have a code problem

int piezoPin = 8;
void setup() {

}

void loop() {
int  VoltageLevel = analogRead(A0);
if (VoltageLevel >= triggerLevel){
digitalWrite(13, HIGH);
tone(piezoPin, 1000);
}
else {
digitalWrite (13, LOW);
tone(piezoPin, 0);
}

}

and gives me this error

 error: 'triggerLevel' was not declared in this scope

 if (VoltageLevel >= triggerLevel){

                     ^

exit status 1
'triggerLevel' was not declared in this scope

please help

That doesn't look like a complete sketch.

Where do you declare triggerLevel?

You need to define triggerLevel somewhere, for example before the setup

int triggerLevel = 127; // <-- put your own value here

lesept:
You need to define triggerLevel somewhere, for example before the setup

int triggerLevel = 127; // <-- put your own value here

thank you

Art69itech:
thank you

So, the lesson is:

A variable must be declared and defined before it is used in a sketch/program.