Need an autonomous

I’m trying to write am autonomous code that just drives our four motor drive train forward any help would be appreciated.

Are you using easyC or robotC?

robotC

1,2,8, and 9

Kind of random but it works

I assume this is to be done so that it drives forward for a certain amount of time then stops? (i.e not using any sensors)

are you using graphical or text?

task main()
{
// Use Motors & Sensor Setup to Configure Your Robot!
enableCompetitionMode();
repeat (forever) {
// Place Autonomous Commands Below
if (getCompetitionAutonomous() == true) {
setMotor(port1, 50);
setMotor(port2, 50);
setMotor(port9, -50);
setMotor(port8, -50);
wait(1, seconds);
stopMultipleMotors(port1, port2, port8, port9);
}
// Place Remote Control Commands Below
if (getCompetitionDriverControl() == true) {
}
}
}

you might need to change the direction of the motors

Assuming you are using the competition template you can copy and paste the contents of the if statement directly into the autonomous task. you just need to check that the directions of the motors are correct as @Maddog13524 says