Code not working

Hello can you please look at my code below and tell me why it is not working. I tried many times and still cannot find a solution. My project is to duplicate a traffic light. Thanks for your time and looking forward to a reply!

#define westButton 3 
#define eastButton 13
#define westRed 2
#define westYellow 1 
#define westGreen 0
#define eastRed 12
#define eastYellow 11
#define eastGreen 10
#define yellowBlinkTime 500 // 0.5 seconds for yellow light blink
v boolean trafficWest = true; // west = true, east = false
w int flowTime = 10000; // amount of time to let traffic flow
x int changeDelay = 2000; // amount of time between color 
void setup()
{
 // setup digital I/O pins
 pinMode(westButton, INPUT);
 pinMode(eastButton, INPUT);
 pinMode(westRed, OUTPUT);
 pinMode(westYellow, OUTPUT);
 pinMode(westGreen, OUTPUT);
 pinMode(eastRed, OUTPUT);
 pinMode(eastYellow, OUTPUT);
 pinMode(eastGreen, OUTPUT);
 
 // set initial state for lights - west side is green first
 digitalWrite(westRed, LOW);
 digitalWrite(westYellow, LOW);
 digitalWrite(westGreen, HIGH); 
 digitalWrite(eastRed, HIGH);
 digitalWrite(eastYellow, LOW);
 digitalWrite(eastGreen, LOW);
}
void loop()
{
 if ( digitalRead(westButton) == HIGH ) // request west>east traffic flow
 {
 if ( trafficWest != true ) 
// only continue if traffic flowing in the opposite (east) direction
 {
 trafficWest = true; // change traffic flow flag to west>east
 delay(flowTime); // give time for traffic to flow 
 digitalWrite(eastGreen, LOW); // change east-facing lights from green 
 // to yellow to red
 digitalWrite(eastYellow, HIGH);
 delay(changeDelay);
 digitalWrite(eastYellow, LOW);
 digitalWrite(eastRed, HIGH);
 delay(changeDelay); 
 for ( int a = 0; a < 5; a++ ) // blink yellow light
 {
 digitalWrite(westYellow, LOW);
 delay(yellowBlinkTime);
 digitalWrite(westYellow, HIGH);
 delay(yellowBlinkTime);
 }
 digitalWrite(westYellow, LOW);
 digitalWrite(westRed, LOW); // change west-facing lights from red to green
 digitalWrite(westGreen, HIGH); 
 }
 }

 if ( digitalRead(eastButton) == HIGH ) // request east>west traffic flow
 {
 if ( trafficWest == true ) 
// only continue if traffic flow is in the opposite (west) direction
 {
 trafficWest = false; // change traffic flow flag to east>west
 delay(flowTime); // give time for traffic to flow 
 digitalWrite(westGreen, LOW); 
// change west lights from green to yellow to red
 digitalWrite(westYellow, HIGH);
 delay(changeDelay);
 digitalWrite(westYellow, LOW);
 digitalWrite(westRed, HIGH);
 delay(changeDelay); 
 for ( int a = 0 ; a < 5 ; a++ ) // blink yellow light 
 {
 digitalWrite(eastYellow, LOW);
 delay(yellowBlinkTime);
 digitalWrite(eastYellow, HIGH);
 delay(yellowBlinkTime);
 } 
 digitalWrite(eastYellow, LOW); 
 digitalWrite(eastRed, LOW); // change east-facing lights from red to green
 digitalWrite(eastGreen, HIGH); 
 }
 }
}

(code tags added by moderator)

What's it do, or not do, that you consider "not working"?

You've got a lot of delays in there, that will disrupt reading any button presses unless they are pressed & held until the code actually gets to then.
Also depending on how they are wired, the inputs might float.
A better method is to use
pinMode (buttonName, INPUT_PULLUP);
to turn on the internal pullup resistor, wire the button to connect the pin to Gnd when pressed, and then look for a Low:

if (digitalRead(buttonName) == LOW){
// button is pressed, do something
}

Thank you for the quick reply, I appreciate it! However, I am still confused with your suggestion. I just started to learn Arduino coding and am not 100% confident with it. I have the Arduino program installed in my computer already and when I put it in the program I get compile time errors. Can you please copy the code that I gave you and put it in the program and check it out yourself when you get the chance?

Thanks a lot, and hopefully you can help me out. I am a high school student taking a digital electronics class. :grin:

I put it in the program I get compile time errors

So why didn't you post them?

Post what? The compile errors? Why do you want me to post them if you put the code in the program?

I can if you want me too, though

Why do you want me to post them if you put the code in the program?

Because my phone doesn't have the IDE installed on it.

Your call (no pun intended)

Is there any way you can put my code in an Arduino Program and fix the problem for me? This is my third week working on this project and it done by Friday.

Thanks for your help!

Yes, I could do that, or you could post the errors and give me some clues.

Again, your call.

Again, I am new to this program and just started to learn it a couple of weeks back. So could you please fix my code for me and then explain what was wrong so in the future I don't run into this problem.

Thanks a lot for your help, you're a life savor! :grin:

What part of "I don't have the IDE installed on my phone" do you not understand?

Do you have it on your computer?

v boolean trafficWest = true; // west = true, east = false
w int flowTime = 10000; // amount of time to let traffic flow
x int changeDelay = 2000; // amount of time between color

Oops

Is that my only problem?

How the Hell should I know?
I can't compile your code on my phone (I may have mentioned this) and even if I could, I don't have your hardware.

can you please look at my code below and tell me why it is not working

If code cannot compile, it cannot upload.
If it cannot upload, it cannot run.
If it cannot run, it cannot be said to be working or not working.

All that can be said of it is that it is not compiling

Then if you don't have this program on your computer, then how do you know what you are doing?

Then if you don't have this program on your computer

I didn't say I don't have it on my computer(s), I said I don't have it on my phone. Haven't you been paying attention?

then how do you know what you are doing?

I just have thirty-odd years experience of doing this stuff.

You should post the error you've got from compiling this program that you have, here. With that and your code which you had posted earlier on, i'm very sure he could help you out. Thirty-odd years of experience isn't for nothing jon16.

AWOL, can you please then put my code in your computer then? Instead of using your phone?

Attached is a picture of one of my errros

image.png