Autonomous doesn't work

My autonomous doesn’t function when it’s a part of the official competition template, but it works when it’s by itself in its own file. This happens with both the competition switch and

Here’s the code…


setLauncher(127);
wait1Msec(5000);
intakeForwardForTime(10000);
launcherHalt();

And its related functions…


void setLauncher(int power)
{
	motor[topRightLaunch] = power;
	motor[topLeftLaunch] = power;
	motor[bottomRightLaunch] = power;
	motor[bottomLeftLaunch] = power;
}

void setIntake(int power)
{
	motor[leftIntake] = power;
	motor[rightIntake] = power;
}

void intakeForward()
{
	setIntake(-127);
}

void intakeForwardForTime(int time)
{
	intakeForward();
	wait1Msec(time);
}

void launcherHalt()
{
	setLauncher(0);
}

I ran it through the debugger, and it gets stuck on this bracket in the official VEX competition includes…


			while (!bIfiAutonomousMode && !bIfiRobotDisabled)
			{
				if (nVexRCReceiveState == vrNoXmiters) // the transmitters are powered off!!
					allMotorsOff();
				wait1Msec(25);
			}

Manually setting bIfiAutonomousMode results ROBOTC in warning me that it’s a constant and can’t be set.

For now I’m using a very hacky fix- I copy-pasted the main competition includes into a new file and changed bIfiAutonomousMode into bIfiAutonomousMode2 and manually set it to false and true when I needed to. It’s not a proper fix by any stretch of the imagination, and I’m thinking a proper fix would be much, much better.