I am stuck and cannot figure it out

I am trying to learn this but it seems to be stumping me at all corners I cannot for the life of me figure where I messed up.

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch_jul09b.ino: In function 'void setup()': sketch_jul09b:11: error: 'BUTTON' was not declared in this scope sketch_jul09b.ino: In function 'void loop()': sketch_jul09b:17: error: 'BUTTON' was not declared in this scope sketch_jul09b:22: error: expected ';' before 'if' sketch_jul09b:23: error: 'else' without a previous 'if' sketch_jul09b:24: error: expected ';' before 'if' 'BUTTON' was not declared in this scope

Clearly you don't read instructions.

Mark

Well, there is the problem right there.

To get help, you must show us your complete sketch. Attach your code using the </> icon on the left side of the posting menu.

The errors really are trying to tell you something.

You are referencing something called "BUTTON", but you haven't declared a variable of that name, nor is there a #define BUTTON anywhere (I suspect you meant the #define)

You're missing semicolons ("expected ; before ..."), and that's causing the other errors. You may also have braces for the if statements messed up. Can't tell since you haven't posted the code.

It's also likely that you have used 'else' without using an if...

:o

These errors indicate you're still fresh to coding. As people suggest, post your code and we' ll nut it out with you.

quick clue. always fix the first error then try to compile again

bottom left of ide shows the number you cursor is on.

sketch_jul09b:11: error: 'BUTTON' was not declared in this scope // this shows first error on line 11

you can also highlight button and use edit-find to locate all the places BUTTON was used. (remember that stuff is case sensitive so BUTTON is not Button or button)

That may be the problem, OP can't count to eleven without taking off shoes.

michinyon: That may be the problem, OP can't count to eleven without taking off shoes.

It's a difficult problem. Me, I can't count to 21 without taking off my pants.

--Michael