its says error expected primary-expression before '==' token in the line if(BUTTON2) == HIGH;
here is the program
pls tell me if anything is wrong im a newbie
idk how to insert i program so i just copy pasted it
int BUTTON1 = 4;
int BUTTON2 = 5;
int LEDY = 11;
int LEDG = 12;
Your digitalReads should be digitalWrites if you're intending to switch an LED on and off.
And you have the brackets in the wrong place in your if statement and it shouldn't have the ; at the end. Have a look under RESOURCES/REFERENCE at the top of the page for the way it should be written.
Also you need digitalRead(BUTTON1) or 2 in those if statements. As it is you are comparing the button pin numbers with HIGH not the state of the pin.
How are the button switches wired? Do they have pulldown resistors from the input to ground?
A more accepted way to wire switches is from a digital input to ground and enable the internal (to the processor) pullup resistors. You, then, need to adjust your logic as the switch input will read HIGH when not pressed and LOW when pressed.