pneumatic programming issues

OK so during the off season (for me anyway) we are doing sumo robot battle things and i had the idea to make an anti skid pneumatic device thing so other robots could not push us around. with this being said i got my pneumatic circuit out and went to program… i don’t understand how to program these. I’ve looked and looked but haven’t found a code that works. here’s what i have :

	if(vexRT[Btn6U]== 1)

	{
		sensorvalue [solenoid] = 0;

	}
		if(vexRT[Btn6D]== 1)
	{
		sensorvalue [solenoid] = 1;
	} 

what do i change what do i do? with this code it does the opposite of what is was when you turn it on ( if its out it goes in) (in it goes out) but this will only happen once with no sign of it doing it again

Are your button statements above in an infinite while loop? – while(true)

no… im an idiot

at least you’re not beta

Ask me how I know to ask you that question. No, you are not an idiot; I have done this about a zillion times. I think it’s finally burned into my brain at this point.

lol yeah. i completly forgot about that step. oops

Same, so many times. I’m sure every programmer has.

Driver: “The robot isn’t moving. Are you sure you programmed the robot right?”
Me: “YES, the brackets are all in the right place and my While loop is ri…ohhh. I have determined a solution thanks to my amazing programming skills!”

thats honestly me…