RobotC Weird Issue

So, I’ve been programming a bit and while beginning on autonomous, I am given the error: Task ‘usercontrol’ is not defined at global scope level. What is this error? How can I fuix this quickly?

Here is some of my code where the error is. (If you need more, just let me know).

task autonomous()
{
	nMotorEncoder[frontleft] = 0;
	while(nMotorEncoder[frontleft] < 1000)
}

task usercontrol()
{
	while (1==1)

Ok, so I added a semicolon after the while statement and it removed the error… It gives a yellow x and says the semicolon shouldn’t be there… I don’t understand RobotC sometimes.

Yep nevermind, I’m new at programming, but I’ve found the problem.