How to do save-able int?

Hello, Look to my name and you will find out my programming level. So here's the problem, I want to make for example pasklevel saved as level. Thats my code I am trying to save pasklevel as level but it doesnt change it still leaves as 0. So the main question is how to declare pasklevel that it always can be changed.

void loop() 
{
  
  int reader1 = analogRead(pot1);
  int reader2 = analogRead(pot2);
 // Serial.println(reader1);
  int level = map(reader1, 0, 1020, 0, 100);
  int leve = map(reader2, 0, 989, 0, 100); 
  int pasklevel = 0;
  int paskleve = 0;
    
  
if(level != pasklevel)
{   
    verte1();
    lcd.setCursor(0, 0);
    lcd.print("                   ");
    garsas();
    pasklevel = level;
    while(1)
    {
      lcd.setCursor(0 , 0);
      verte1();
     int leve = map(reader2, 0, 989, 0, 100);
     int reader2 = analogRead(pot2);
      
      if(leve != paskleve)
     {
        break;
     }
    else
    {
    } 
 }  
    
}


   if(leve != paskleve)
    {
      verte2();
      lcd.setCursor(0, 0);
      lcd.print("                   ");
      bass();
      paskleve = leve;
      while(1)
      {
        verte2();
        int reader = analogRead(pot1);
        int level = map(reader, 0, 1020, 0, 100);
          if(level != pasklevel)
          {
            break;
            return;
          }
    }
  } 
    else
  {
    lcd.setCursor(0, 0);
    lcd.print("Veikia ELSE!!!");
  }
}

Thats my code I am trying to save pasklevel as level but it doesnt change it still leaves as 0.

Leaves what? pasklevel is a local variable. It is recreated, and initialized to 0 the next time loop() iterates.

You could make it static, to that wouldn't happen, or you could make it global.

You could (and should) also use Tools + Auto Format, so your code doesn't earn the name BornToBeDrunkenSailor.

BornToBeDumb:
I am trying to save pasklevel as level but it doesnt change it still leaves as 0.

How do you know that?

You assign a value to pasklevel:

pasklevel = level;

…but you never output it, and the only test on it is right before the end of the code.

If any of the functions you call (verte1(), verte2(), garsas(), bass()) are supposed to output it, that doesn’t work, because those function have no access to variables that are local to loop(). If this is the case (and I’m just guessing here…) you could pass the value to those functions as arguments:

void loop()
{
  int pasklevel;

  // bla
  verte1(pasklevel); // <-- pass value to function as argument
  // bla
}


void verte1(int value)
{
  // now you can do stuff with 'value' here, 
  // which is whatever got passed in the function call
}

Make pasklevel a global variable. Place it outside of loop() or setup()…

int pasklevel;
//...
void setup()
{/...