8 led control by push button

hello im making a running 8 led that control by a single push button…
the push button here has big part here… when push button press the led will stop and stay at what led its stop and when push button press again the led will continue the running light where it is stop…
that simple…
my problem when i press its stop but when i press again it wont run again…
hope some help me… i been working 5day to solve but i think i need a help here… so i posted…
here is the code:
free to edit also;;
int suga1 = 3;
int suga2 = 4;
int suga3 = 5;
int suga4 = 6;
int suga5 = 7;
int suga6 = 8;
int suga7 = 9;
int suga8 = 10;
int pidlit = 2;
boolean old_val = LOW;
int Lightposition = 0;
int pause = 100;
long lastmove = millis();
int stop = HIGH;
void setup()
{
pinMode(suga1, OUTPUT);
pinMode(suga2, OUTPUT);
pinMode(suga3, OUTPUT);
pinMode(suga4, OUTPUT);
pinMode(suga5, OUTPUT);
pinMode(suga6, OUTPUT);
pinMode(suga7, OUTPUT);
pinMode(suga8, OUTPUT);
pinMode(pidlit, INPUT);
Serial.begin(9600);
}
void loop()
{
if(millis()- lastmove > pause)
{
lastmove = millis();
Lightposition++;
if(Lightposition >= 10) Lightposition = 1;
move(Lightposition);
}
if (digitalRead(pidlit) == HIGH && old_val == LOW)
{
for (int x = 0; x <= 12; x–)
digitalWrite(Lightposition + 1, HIGH);
}

}
void move(int Lightposition)
{
for (int x = suga1; x <= suga8;x++)
{
digitalWrite(x, LOW);
}
digitalWrite(Lightposition + 1, HIGH);
}

This part:

  if (digitalRead(pidlit) == HIGH && old_val == LOW)
  {
      for (int x = 0; x <= 12; x--)
      digitalWrite(Lightposition + 1, HIGH);
  }

(by the way, that for loop is definitely wrong, but I don’t know what you’re trying to do there)

should probably be more like:

  if (digitalRead(pidlit) == HIGH)
  {
      // first press. Wait here until they release
      while   (digitalRead(pidlit)  == HIGH)
           ;

      // they've released. Wait until they press again
      while   (digitalRead(pidlit)  == LOW)
           ;

      // They've pressed again. Wait here until they release, then let us run again
      while   (digitalRead(pidlit)  == HIGH)
           ;
     }
  }

And a good habit to get into is to comment your code. It helps others, but also, it helps you debug because it makes you think about what you’re doing at each point.

ty for the reply.. maybe i made it wrong... btw.. i have no knowledge about programing language.. all i have is now understanding... btw i want is when i press and release the button the light will stop and stay where it is..and when press and release again the led will continue the loop or the running led..

please explain how the program works..how each syntax works??tnx

Did you notice when the question was posted?

yes but i want to know the functionality of the syntax/code…