Serial Read in setup funtion to read in loop function

Hello! I'm wondering why I'm having this Error Compiling Message: "error: 'standby' was not declared in this scope" in function void.

I declare "standby" in setup function:

  Serial.begin(9600);
  
  Serial.println("Choose your standby Power:");
  
  
  while(Serial.available()==0){
  
//TFT definitions

screen.stroke(0, 0, 0);
  screen.setTextSize(2);
  screen.text("Go to \n Serial Port", 12, 40); //Texto -7 nos yy
  
}
  
 
 
  screen.background(204,229, 255);
  
  float serialPower=Serial.parseFloat();
  
  float standby=serialPower*graphHeight/11500;

(graphHeight is declared before the setup function)

In funtion void loop():

void loop() {


//other instructions here...

screen.stroke(0, 250, 0); //GREEN
    screen.line(xPos, blueDownLineY-standby, xPos, blueDownLineY);

As before I do not have problems with undeclared things (I declared them all!!)... I just don't know if we can declare something to read on setup() and then use that value in loop() function...

I figured out what the problem was!

I figured out what the problem was!

You really should tell everyone what the problem was so others don't make the same mistake. Also, you might want to use Ctrl-T in the IDE before posting your code. It will format it into a standard form.