I'm attempting to use a button to start a sketch but am having an error

Hello everyone. Let me start by saying that I'm new to Arduino and am hoping to get help with an issue I'm having. I'm attempting to use a button to start a sketch. I have created the code below to for an 8 Channel relay to sequence through using a button to start the sketch. However, when I try to compile the code I get the following error: Error compiling for board Arduino/Genuino Uno.

#include <Button.h>

Button button = Button(12,PULLUP);
const int relay1 = 2;
const int relay2 = 3;
int LightON = 5000;
int Pause = 1000;

void setup()
// put your setup code here, to run once:

{

Serial.begin(9600);

pinMode(relay1, OUTPUT);
pinMode(relay2, OUTPUT);

}

void loop()

{
// put your main code here, to run repeatedly:

if(button.uniquePress(){//button.isPressed() will cause the code to execute as long as button is pressed

digitalWrite(relay1, HIGH); //Turn relay 1 OFF

digitalWrite(relay2, HIGH); //Turn relay 2 OFF

Serial.println("Relays OFF");

delay(Pause);

digitalWrite(relay1, LOW); //Turn relay 1 ON

Serial.println("Relay 1 ON");

delay(LightON);

digitalWrite(relay1, HIGH); //Turn relay 1 OFF

Serial.println("Relay 1 OFF");

delay(Pause);

digitalWrite(relay2, LOW); //Turn relay 2 ON

Serial.println("Relay 2 ON");

delay(LightON);

digitalWrite(relay2, HIGH); //Turn relay 2 OFF

Serial.println("Relay 2 OFF");

delay(Pause);

}

}

Please help! thank you in advance!

Although a table is better than nothing, it's not code-tags. Please see How to use the forum and edit you post.

And while you're at it, that is only the start of the error message. Copy all. Or better, read it yourself. Because it will pretty much tell you where the error is :wink:

It complained to me about this line:

if(button.uniquePress(){

.... needing one more ) thus:

if(button.uniquePress()){

.... and then it compiled.

Aka, like I said, the compiler points you straight to it :wink:

Thank you for everyone's help. My apologies for not following the forum rules for posting code.