Coding Help Needed Badly

I have states in a week, and nothing on my competition code works. I downloaded my skills program, and that works, so its not the autonomous. I recently did a redesign and changed my lift. Because of this, I changed a little bit of my program, but the code for my drive train and mogo lift remained the same. It worked before, but now it doesn’t. I need help. I will post my code shortly.

Ok, we will see if we can help you if you post the code soon.

For bugs where “nothing works” it is typically a misplaced brace { } and usually near an if statement. Since the braces are optional with if statements the compiler may not see it as an error.

Faulty pseudo-code the complies without errors

while (true) 
	// Missing opening brace {
		motor[port5] = 127;  //This line still works
	} // This closing brace now closes the while loop and the rest of the code doesn't run.
		motor[port5] = -127
		motor[port5] = 0;
		//Missing closing brace allows code to compile without error.  
//.. chassis code

//.. intake code


For more advanced programmers that use tasks, many times programmers forget to start the tasks.

this may be a stupid question but even i have this problem sometimes but is it in the competition format ? if nothing on the driver control is working this may be the problem. if things are working then look and make sure everything is connected.

@Alpha Entity If your code is not in the Competition Template, it will not work when you connect to the field. Our team played a match with this one alliance and they wouldn’t work on field. Directly after, we went to check out their code and saw that it wasn’t placed in the Competition Template. Simple, but overlooked mistake.

^! Make sure you have

#pragma platform(VEX2)
#pragma competitionControl(Competition)
#include "Vex_Competition_Includes.c"

at the beginning of the main file!

Also, you can try using to compare two versions of your code side-by-side, to see what was added and deleted between the two versions.

yup! ive done that before just wanted to make sure they didn’t have the same fate

I can’t reach my code until tommorow to post it, but I took my driver control code out of the competition template into a normal program, and it worked fine

If it still isn’t working, I can almost guarantee copying and pasting each part of your program into a new file will fix it. Take the driver control code that you created, and put that in the driver control in the new template. Do this for every part of your program, but make sure to only copy what you wrote. Nothing that was pregenerated by the template.