expected primary expression before int

"expected primary expression before int" ive been staring at that massage for about 2 minutes >:( the code line i got it in is this digitalWrite (int thisled = 0; leds [thisled], HIGH);
the full code is this

int leds = 13;
int ledDelay = 40;
int ledPins [] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
int buttonPin = 22;
int thisled = 0;

void setup () {
  for (int thisled = 0;  thisled < leds; thisled++) {
    pinMode (ledPins [thisled], OUTPUT);
  }
  pinMode (buttonPin, INPUT);
}


void loop () {
  for (thisled < leds-1; thisled++;) {
    digitalWrite (int thisled = 0; leds [thisled], HIGH);
    delay (ledDelay);
    while (digitalRead (buttonPin) == HIGH); {
      delay(10);
    }
    digitalWrite (ledPins [thistled], LOW
  }
}

i cant see why this is not working i am following this video step by step except for the numbers at the top the video link is this Freetronics Arduino Lab 3 (pause button) - YouTube can anyone help me?

This is missing the starting condition

for (thisled < leds-1; thisled++;) {

Probably want to change this to use INPUT_PULLUP

pinMode (buttonPin, INPUT);

And wire a button to connect the pin to Gnd to get out of the while

while (digitalRead (buttonPin) == HIGH); {
delay(10);
}

while (digitalRead (buttonPin) == HIGH); {
      delay(10);
    }

You got an extra semicolon in there.

digitalWrite (int thisled = 0; leds [thisled], HIGH);

That's not how digitalWrite works. What were you hoping to accomplish with that? digitalWrite just takes a pin number and a state, either LOW or HIGH.

@OP

Given below a revised copy of the codes of your original post. Go over every line and see if you can notice the difference and the reason for revision.

int leds = 13;
int ledDelay = 40;
int ledPins [] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
int buttonPin = 22;
int thisled = 0;

void setup () {
  for (thisled = 0;  thisled < leds; thisled++) {  //no need declaring data type again; sometimes creates problem
    pinMode (ledPins [thisled], OUTPUT);
  }
  pinMode (buttonPin, INPUT); //insert external pull-down/pull-up as needed
}


void loop () {
  for (thisled < leds - 1; thisled++;) {
    //digitalWrite (int thisled = 0; leds [thisled], HIGH);
    digitalWrite(ledPins[thisled], HIGH); //shpuld be this; not above
    delay (ledDelay);
    while (digitalRead (buttonPin) == HIGH); { //why semicolon is here? Shpuld be deleted
      delay(10);
    }
    //digitalWrite (ledPins [thistled], LOW
    digitalWrite(ledPins[thisled], LOW); //should be this; not the above
  }
}
for (thisled < leds - 1; thisled++;) {

That line definitely isn't right.

for (thisled = 0;thisled < leds - 1; thisled++;) {

Maybe?

Delta_G:

for (thisled < leds - 1; thisled++;) {

That line definitely isn't right.

for (thisled = 0;thisled < leds - 1; thisled++;) {

Maybe?

Correct.

GolamMostafa:
@OP

Given below a revised copy of the codes of your original post. Go over every line and see if you can notice the difference and the reason for revision.

int leds = 13;

int ledDelay = 40;
int ledPins [] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
int buttonPin = 22;
int thisled = 0;

void setup () {
  for (thisled = 0;  thisled < leds; thisled++) {  //no need declaring data type again; sometimes creates problem
    pinMode (ledPins [thisled], OUTPUT);
  }
  pinMode (buttonPin, INPUT); //insert external pull-down/pull-up as needed
}

void loop () {
  for (thisled < leds - 1; thisled++;) {
    //digitalWrite (int thisled = 0; leds [thisled], HIGH);
    digitalWrite(ledPins[thisled], HIGH); //shpuld be this; not above
    delay (ledDelay);
    while (digitalRead (buttonPin) == HIGH); { //why semicolon is here? Shpuld be deleted
      delay(10);
    }
    //digitalWrite (ledPins [thistled], LOW
    digitalWrite(ledPins[thisled], LOW); //should be this; not the above
  }
}

i got some of the errors back to normal but cant figure out what you mean on others just a beginner sorry but can you please send full code with errors fixed because now it just turns on 1 LED then turns it of and then nothing

for (thisled < leds - 1; thisled++;) {

Take this line as an example. If the compiler complains about this a good starting point is to go to the language reference for the command/statement. This will give a sample of correct usage and syntax for same. Compare what you have against the standard and go from there.

purplemaniak7:
"expected primary expression before int" ive been staring at that massage for about 2 minutes

i cant see why this is not working i am following this video step by step except for the numbers at the top the video link is this https://www.youtube.com/watch?v=WmYglLwAAlU can anyone help me?

purplemaniak7:
i got some of the errors back to normal but cant figure out what you mean on others just a beginner sorry but can you please send full code with errors fixed because now it just turns on 1 LED then turns it of and then nothing

@purplemaniak7:
If English is your native language, how about writing in English? That means paragraphs, sentences, capitalization, and punctuation. BTW, you should stare at if for maybe 2 hours before asking for free help.

gfvalvo:
@purplemaniak7:
If English is your native language, how about writing in English? That means paragraphs, sentences, capitalization, and punctuation. BTW, you should stare at if for maybe 2 hours before asking for free help.

I find that i HAVE stared at that for about 2 hours now because i posted that about a week ago.
:smiley:

Well stop staring at that line of code and start reading a C++ tutorial then. You'll get a lot further that way.