clap switch pls help me!!

need some help in this programme i cant seem to compile it..

const int Redled = 12; // the number of LED pin
const int Greenled = 13; // the number of LED pin
const int buttonPin = 2; // the number of the pushbutton pin

void setup() {

pinMode(Redled , OUTPUT); // initialize LED pin 12 as an output

pinMode(Greenled, OUTPUT); // initialize LED pin 13 as an output

digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second

pinMode(buttonPin, INPUT); // initialize the pushbutton pin as an input

pinMode(Redled, OUTPUT); // initialize the RedlED pin as an output

pinMode(Greenled, OUTPUT); // initialize the GreenlED pin as an output

}

void loop() {

byte buttonState = digitalRead(buttonPin); // read the state of the pushbutton value

if
{
(buttonState == HIGH); // if it is, the buttonState is HIGH
// check if the pushbutton is pressed
digitalWrite(Redled, HIGH); // turn the RedLED on (HIGH is the voltage level)
digitalWrite(Redled, HIGH); // turn the RedLED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(Greenled, LOW); // turn the GreenLED off by making the voltage LOW
delay(500); // wait for a second
digitalWrite(Greenled, LOW); // turn the GreenLED off by making the voltage LOW
delay(500); // wait for a second
}

{
else

// turn LED off:
digitalWrite(RedledPin, HIGH);
digitalWrite(GreenledPin, LOW);
delay(200);
digitalWrite(GreenledPin, LOW);
digitalWrite(RedledPin, HIGH);
delay(200);
digitalWrite(GreenledPin, LOW);

}
}

Hi,
Are you having trouble clicking on VERIFY, or are there some kind of error messages??

there is one error call expected '(' before '{' token and i still cant find the reason pls help me if you can thanks...

If you open the error section of the IDE, you will see several error messages:

sketch_oct16a:34: error: expected '(' before '{' token

 {

 ^

sketch_oct16a:47: error: 'else' without a previous 'if'

     else

     ^

sketch_oct16a:50: error: 'RedledPin' was not declared in this scope

       digitalWrite(RedledPin, HIGH);

                    ^


sketch_oct16a:51: error: 'GreenledPin' was not declared in this scope

     digitalWrite(GreenledPin, LOW);

                  ^

exit status 1
expected '(' before '{' token

So 3 things:

  1. Make the Greenled & Redled names consistent throughout
  2. Fix your { } around if else code:
    if ( ) {
    //code
    }
    else {
    // code
    }
  3. Delete the ; in the if line.

(deleted)