Code problem from a newbie

Hi Folks,
I would appreciate some help with this problem. I keep getting the message “expected primary-expression before } token”
I have tried to combine two codes - one which creates an array to make a chase effect with leds and one which uses a button to control an led however i cannot make the button start and end the chase. What am I doing wrong?
I should also say that each code works perfectly before I combine them

Any help most welcome.

Many thanks,

Frank

/*
The circuit:

  • LEDs from pins 2 through 9 to ground

created 2006
by David A. Mellis
modified 5 Jul 2009
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/Array
*/
int Button=1; //button assigned to pin 1
int timer = 100; // The higher the number, the slower the timing.
int ledPins = {
2,3,4,5,6,7,8,9 }; // an array of pin numbers to which LEDs are attached
int pinCount = 8; // the number of pins (i.e. the length of the array)

void setup() {
pinMode(Button, INPUT);
int thisPin;
// the array elements are numbered from 0 to (pinCount - 1).
// use a for loop to initialize each pin as an output:
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
pinMode(ledPins[thisPin], OUTPUT);
}
}

void loop() {
// loop from the lowest pin to the highest:
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
// turn the pin on:
digitalWrite(ledPins[thisPin], HIGH);
delay(timer);
// turn the pin off:
{
digitalWrite(ledPins[thisPin], LOW);
}
while (digitalRead(Button)==HIGH)
}

// loop from the highest pin to the lowest:
for (int thisPin = pinCount - 1; thisPin >= 0; thisPin–) {
// turn the pin on:
digitalWrite(ledPins[thisPin], HIGH);
delay(timer);
// turn the pin off:
digitalWrite(ledPins[thisPin], LOW);
}
}

while (digitalRead(Button)==HIGH)

While digitalRead() = HIGH, do what? You have no statement in this while loop.

If you want NOTHING to happen in the loop, then do something like this:

while (digitalRead(Button)==HIGH)
             /* Do Nothing */ ;

The semicolon is critical.

What gardner said essentially, that particular error means that the compiler is seeing a '}' instead of a character it is expecting. generally the last character it looks for before a } is ; because you end a line before closing a code block.

Hi, I am so new to this that I don't really understand the answer do you mean I write "turn array on" or something and how do I get it to turn off when the button is "low" is it simply the reverse of this or do I need Arduino syntax (if so iy is precisely this I need help with.

Many thanks,

Frank