Need Help with TROUBLE SHOOTING my CODE

The code is fine for every line accept line 25, and the errors listed are:
In function ‘void oneAfterAnotherNoLoop()’:
25:3: error: expected primary-expression before ‘…’ token
exit status 1

The Full Code:

int ledPins = {2,3,4,5,6,7,8,9};

void setup()

{

for(int i = 0; i < 8; i++){

pinMode(ledPins*,OUTPUT);*

  • }*
    }
    void loop()
    {
  • oneAfterAnotherNoLoop();*

}
void oneAfterAnotherNoLoop(){

  • int delayTime = 100;*

  • digitalWrite(ledPins[0], HIGH);*

  • delay(delayTime);*

  • …*

  • …*

  • digitalWrite(ledPins[7], HIGH);*

  • delay(delayTime); // The line of code that has the problem*

  • digitalWrite(ledPins[7], LOW);*

  • delay(delayTime);*

}
-----------------------------------------------------------------------------------------------------------------------------------------
Any help would be appreciated.

You need to comment out the … The compiler sees those as ellipsis (…) in the wrong place. You cannot just stick any old things into the code. The syntax is well defined and there are references to C++ for Arduino syntax.

Since you did not post the code in code tags the forum software changed your code to italics and ate the array index for ledPins. Read the how get the most out of this forum sticky to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code in code tags.

Here is your code after using autoformat, deleting the unnecessary white space and posted in code tags. I commented the … , too. It will now compile.

int ledPins[] = {2, 3, 4, 5, 6, 7, 8, 9};

void setup()
{
   for (int i = 0; i < 8; i++)
   {
      pinMode(ledPins[i], OUTPUT);
   }
}


void loop()
{
   oneAfterAnotherNoLoop();
}

void oneAfterAnotherNoLoop()
{
   int delayTime = 100;
   digitalWrite(ledPins[0], HIGH);
   delay(delayTime);

   //...
   //... 
   
   digitalWrite(ledPins[7], HIGH);
   delay(delayTime); // The line of code that has the problem
   digitalWrite(ledPins[7], LOW);
   delay(delayTime);
}

Isn’t this easier to read and follow?

Read the topic "How to use this Forum", especially #7 telling how to post code being corrected using Autoformat in the IDE.
Post a copy if the compiler error message. Line numbers don't show up here.

Thanks guys the code runs now, and I'll read the "How to get the most out of this forum" and other guidelines have a great day.