Code help

We have been working on our code for weeks and cannot find the issue. Buttons 8u and 8d are to be used to make our scissos lift up and down on ports 4 and 5. We tried switching motors, controllers, cortex, remote control…
Here is the code:

#pragma config(Motor, port1, frontLeftMotor, tmotorVex393, openLoop)
#pragma config(Motor, port2, backRightMotor, tmotorVex393, openLoop, reversed)
#pragma config(Motor, port3, frontRightMotor, tmotorVex393, openLoop, reversed)
#pragma config(Motor, port4, liftLeftMotor, tmotorVex393, openLoop)
#pragma config(Motor, port5, liftRightMotor, tmotorVex393, openLoop)
#pragma config(Motor, port6, armMotor, tmotorVex393, openLoop)
#pragma config(Motor, port7, shooterRight, tmotorVex393HighSpeed, openLoop, reversed)
#pragma config(Motor, port8, shooterLeft, tmotorVex393HighSpeed, openLoop)
#pragma config(Motor, port9, intakeBottom, tmotorVex393, openLoop)
#pragma config(Motor, port10, backLeftMotor, tmotorVex393, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include “Vex_Competition_Includes.c” //Main competition background code…do not modify!

/////////////////////////////////////////////////////////////////////////////////////////
//
// Pre-Autonomous Functions
//
// You may want to perform some actions before the competition starts. Do them in the
// following function.
//
/////////////////////////////////////////////////////////////////////////////////////////

void pre_auton()
{
// Set bStopTasksBetweenModes to false if you want to keep user created tasks running between
// Autonomous and Tele-Op modes. You will need to manage all user created tasks if set to false.
bStopTasksBetweenModes = true;

// All activities that occur before the competition starts
// Example: clearing encoders, setting servo positions, ...

}

/////////////////////////////////////////////////////////////////////////////////////////
//
// Autonomous Task
//
// This task is used to control your robot during the autonomous phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task autonomous()
{
// …
// Insert user code here.
wait1Msec(500); // Robot waits for 500 milliseconds before executing program8

motor [shooterLeft] = 85;
motor [shooterRight] = 85;
motor[armMotor] = 90;
motor[intakeBottom] = -90;
wait1Msec(15000);


// .....................................................................................

AutonomousCodePlaceholderForTesting();  // Remove this function call once you have "real" code.

}

/////////////////////////////////////////////////////////////////////////////////////////
//
// User Control Task
//
// This task is used to control your robot during the user control phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task usercontrol()
{
// User control code here, inside the loop

while (true)
{
	// This is the main execution loop for the user control program. Each time through the loop
	// your program should update motor + servo values based on feedback from the joysticks.

	// .....................................................................................
	// Insert user code here. This is where you use the joystick values to update your motors, et
	{
		while(1 == 1)
		{
			//Right side of the robot is controlled by the right joystick, Y-axis
			motor[backLeftMotor] = vexRT[Ch2]; // port ??
			motor[frontLeftMotor]  = vexRT[Ch2]; // port??
			//Left side of the robot is controlled by the left joystick, Y-axis
			motor[backRightMotor] = vexRT[Ch3];  // port ??
			motor[frontRightMotor]  = vexRT[Ch3];// port ??


			//Arm Control
			if(vexRT[Btn5U] == 1)
			{
				motor[armMotor] = 100;
			}
			else if(vexRT[Btn5D] == 1)
			{
				motor[armMotor] = - 100;
			}
			else
			{
				motor[armMotor] = 0;
			}

			//Shooter Left1 port 7
			/* if(vexRT[Btn6U] == 1)
			{
			motor[shooterLeft] = 120;
			}
			*/
			if(vexRT[Btn6U] == 1)
			{
				motor[shooterLeft] = 85;
			}
			else
			{
				motor[shooterLeft] = 0;
			}

			//Shooter Left 2 port 5
			/* if(vexRT[Btn6U] == 1)
			{
			motor[shooterLeft2] = 120;
			}

			if(vexRT[Btn6D] == 1)
			{
			motor[shooterLeft2] = -85;
			}
			else
			{
			motor[shooterLeft2] = 0;
			}

			*/


			//Shooter Right port 8
			/* if(vexRT[Btn6U] == 1)
			{
			motor[shooterRight] = 127;
			}*/
			if(vexRT[Btn6U] == 1)
			{
				motor[shooterRight] = 85;
			}
			else
			{
				motor[shooterRight] = 0;
			}

			//shooterRight2 port 7
			/*  if(vexRT[Btn7D] == 1)
			{
			motor[shooterRight2] = -85;
			}
			else
			{
			motor[shooterRight2] = 0;
			}

			*/

			//Shooters mid field
			//Shooter left

			/*if(vexRT[Btn7D] == 1)
			{
			motor[shooterLeft] = 55;
			}
			else
			{
			motor[shooterLeft] = 0;
			}


			//Shooter Right
			}
			if(vexRT[Btn7D] == 1)
			{
			motor[shooterRight] = 55;
			}
			else
			{
			motor[shooterRight] = 0;
			}
			*/
			//intakeBottom
			if(vexRT[Btn5U] == 1)
			{
				motor[intakeBottom] = - 100;
			}
			/*else if(vexRT[Btn5D] == 1)
			{
			motor[intakeBottom] = 100;
			}*/
			else
			{
				motor[intakeBottom] = 0;
			}
		}
		//Lift motor1 Control port 4
		if(vexRT[Btn8U] == 1)
		{
			motor[liftLeftMotor] = -100;
		}
		else if(vexRT[Btn8D] == 1)
		{
			motor[liftLeftMotor] = 100;
		}
		else
		{
			motor[liftLeftMotor] = 0;
		}

		//Lift motor2 Control port 5
		if(vexRT[Btn8U] == 1)
		{
			motor[liftRightMotor] = -100;
		}
		else if(vexRT[Btn8D] == 1)
		{
			motor[liftRightMotor] = 100;
		}
		else
		{
			motor[liftRightMotor] = 0;
		}

	}

	// .....................................................................................
}

}

Can you explain its behavior? What exactly is the problem?

Lets look at the beginning of user control

	while (true)
	{
		// This is the main execution loop for the user control program. Each time through the loop
		// your program should update motor + servo values based on feedback from the joysticks.

		// .....................................................................................
		// Insert user code here. This is where you use the joystick values to update your motors, et
		{
			while(1 == 1)
			{

You have two nested while loops and also an additional brace so three levels deep.

Now look at the end.

			} // <----- end of the while loop
			//Lift motor1 Control port 4
			if(vexRT[Btn8U] == 1)
			{
				motor[liftLeftMotor] = -100;
			}
			else if(vexRT[Btn8D] == 1)
			{
				motor[liftLeftMotor] = 100;
			}
			else
			{
				motor[liftLeftMotor] = 0;
			}

			//Lift motor2 Control port 5
			if(vexRT[Btn8U] == 1)
			{
				motor[liftRightMotor] = -100;
			}
			else if(vexRT[Btn8D] == 1)
			{
				motor[liftRightMotor] = 100;
			}
			else
			{
				motor[liftRightMotor] = 0;
			}

		}

		// .....................................................................................
	}

Notice how all the Btn8 code is outside the inner loop, it will never be reached.

Here is some revised code, I removed the unneeded outer loop.

#pragma config(Motor, port1, frontLeftMotor, tmotorVex393, openLoop)
#pragma config(Motor, port2, backRightMotor, tmotorVex393, openLoop, reversed)
#pragma config(Motor, port3, frontRightMotor, tmotorVex393, openLoop, reversed)
#pragma config(Motor, port4, liftLeftMotor, tmotorVex393, openLoop)
#pragma config(Motor, port5, liftRightMotor, tmotorVex393, openLoop)
#pragma config(Motor, port6, armMotor, tmotorVex393, openLoop)
#pragma config(Motor, port7, shooterRight, tmotorVex393HighSpeed, openLoop, reversed)
#pragma config(Motor, port8, shooterLeft, tmotorVex393HighSpeed, openLoop)
#pragma config(Motor, port9, intakeBottom, tmotorVex393, openLoop)
#pragma config(Motor, port10, backLeftMotor, tmotorVex393, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include "Vex_Competition_Includes.c" //Main competition background code...do  not modify!

/////////////////////////////////////////////////////////////////////////////////////////
//
// Pre-Autonomous Functions
//
// You may want to perform some actions before the competition starts. Do them in the
// following function.
//
/////////////////////////////////////////////////////////////////////////////////////////

void pre_auton()
{
  // Set bStopTasksBetweenModes to false if you want to keep user created tasks running between
  // Autonomous and Tele-Op modes. You will need to manage all user created tasks if set to false.
  bStopTasksBetweenModes = true;

  // All activities that occur before the competition starts
  // Example: clearing encoders, setting servo positions, ...
}

/////////////////////////////////////////////////////////////////////////////////////////
//
// Autonomous Task
//
// This task is used to control your robot during the autonomous phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task autonomous()
{
  // .....................................................................................
  // Insert user code here.
  wait1Msec(500); // Robot waits for 500 milliseconds before executing program8

  motor [shooterLeft] = 85;
  motor [shooterRight] = 85;
  motor[armMotor] = 90;
  motor[intakeBottom] = -90;
  wait1Msec(15000);

  // .....................................................................................

  AutonomousCodePlaceholderForTesting(); // Remove this function call once you have "real" code.
}

/////////////////////////////////////////////////////////////////////////////////////////
//
// User Control Task
//
// This task is used to control your robot during the user control phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task usercontrol()
{
  // User control code here, inside the loop

  while(1 == 1)
  {
    //Right side of the robot is controlled by the right joystick, Y-axis
    motor[backLeftMotor] = vexRT[Ch2]; // port ??
    motor[frontLeftMotor] = vexRT[Ch2]; // port??
    //Left side of the robot is controlled by the left joystick, Y-axis
    motor[backRightMotor] = vexRT[Ch3]; // port ??
    motor[frontRightMotor] = vexRT[Ch3];// port ??

    //Arm Control
    if(vexRT[Btn5U] == 1)
    {
      motor[armMotor] = 100;
    }
    else if(vexRT[Btn5D] == 1)
    {
      motor[armMotor] = - 100;
    }
    else
    {
      motor[armMotor] = 0;
    }

    //Shooter Left1 port 7
    /* if(vexRT[Btn6U] == 1)
    {
    motor[shooterLeft] = 120;
    }
    */
    if(vexRT[Btn6U] == 1)
    {
      motor[shooterLeft] = 85;
    }
    else
    {
      motor[shooterLeft] = 0;
    }

    //Shooter Left 2 port 5
    /* if(vexRT[Btn6U] == 1)
    {
    motor[shooterLeft2] = 120;
    }

    if(vexRT[Btn6D] == 1)
    {
    motor[shooterLeft2] = -85;
    }
    else
    {
    motor[shooterLeft2] = 0;
    }

    */

    //Shooter Right port 8
    /* if(vexRT[Btn6U] == 1)
    {
    motor[shooterRight] = 127;
    }*/
    if(vexRT[Btn6U] == 1)
    {
      motor[shooterRight] = 85;
    }
    else
    {
      motor[shooterRight] = 0;
    }

    //shooterRight2 port 7
    /* if(vexRT[Btn7D] == 1)
    {
    motor[shooterRight2] = -85;
    }
    else
    {
    motor[shooterRight2] = 0;
    }

    */

    //Shooters mid field
    //Shooter left

    /*if(vexRT[Btn7D] == 1)
    {
    motor[shooterLeft] = 55;
    }
    else
    {
    motor[shooterLeft] = 0;
    }

    //Shooter Right
    }
    if(vexRT[Btn7D] == 1)
    {
    motor[shooterRight] = 55;
    }
    else
    {
    motor[shooterRight] = 0;
    }
    */
    //intakeBottom
    if(vexRT[Btn5U] == 1)
    {
      motor[intakeBottom] = - 100;
    }
    /*else if(vexRT[Btn5D] == 1)
    {
    motor[intakeBottom] = 100;
    }*/
    else
    {
      motor[intakeBottom] = 0;
    }

    //Lift motor1 Control port 4
    if(vexRT[Btn8U] == 1)
    {
      motor[liftLeftMotor] = -100;
    }
    else if(vexRT[Btn8D] == 1)
    {
      motor[liftLeftMotor] = 100;
    }
    else
    {
      motor[liftLeftMotor] = 0;
    }

    //Lift motor2 Control port 5
    if(vexRT[Btn8U] == 1)
    {
      motor[liftRightMotor] = -100;
    }
    else if(vexRT[Btn8D] == 1)
    {
      motor[liftRightMotor] = 100;
    }
    else
    {
      motor[liftRightMotor] = 0;
    }
    
  }// end of while
}