code gives me errors

so new to the forum and trying to make joysticks work with bot but it always gives me two errors of the same thing, what is wrong?
help is greatly appreciated.
here is all my code lines |
/

#pragma config(Motor, mtr_Matrix_S1_1, FLMotor, tmotorTetrix, PIDControl, reversed, encoder)
#pragma config(Motor, mtr_Matrix_S1_2, FRMotor, tmotorTetrix, PIDControl, encoder)

//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

#pragma debuggerWindows(“joystickSimple”);
#include “JoystickDriver.c”

task main()
{
while(true) //Loop Forever

    //Get the Latest joystick values
    getJoystickSettings(joystick);

    //Driving Control
    //left y
    if(abs(joystick.joy1_y1) > 3)

        motor[FRMotor] = joystick.joy1_y1;
        motor[FLMotor] = joystick.joy1_y1;
    {
        motor[FLMotor] = 0;
        motor[FRMotor] = 0;
        //right x
        if(abs(joystick.joy1_x2) > 3) //

        motor[FRMotor] = -joystick.joy1_x2;
        motor[FLMotor] = joystick.joy1_x2;
    }
        motor[FLMotor] = 0;
        motor[FRMotor] = 0;
    }
    
//Infinite Loop
while(true)

    //If button 6 (right bumper) is pressed
    if(joy1Btn(06) == 1)
    {
        //Raise the arm
        motor[PORT7] = 100;
    }

    //Else, if button 8 (right trigger) is pressed
    else if(joy1Btn(08) == 1)
    {
        //Lower the arm
        motor[PORT7] = -100;
    }
    //Else (no button pressed)
    else if(joy1Btn(08) == 0)

{
//Turn the arm motor off
motor[PORT7] = 0;
}
{
//Infinite Loop
while(true)

//If button 5 (left bumper) is pressed
if(joy1Btn(05) == 1)
{
//Open the claw
motor[PORT6] = 100;
}
//Else, if button 7 (left trigger) is pressed
else if(joy1Btn(07) == 1)
{
//Close the claw
motor[PORT6] = -100;
}
//Else (no button pressed)
else if(joy1Btn(07) == 0)
{
//Turn the arm motor off
motor[PORT6] = 0;

}
}

Rather than debugging or writing this on your own in this manner, check the sample code (examples) provided by the software install. There is joystick control code already, which you can adapt to your motors. So you can open the code, configure it for your motors. It should be ready. Test.

Then add in buttons, also using snippets from sample code. Take it and paste into your driver control program. Combined it should work out. Then take a look at the code you just combined. That is the way it should look.

I do not have the software installed or updated at the moment on my pc but did not uninstall the old… from samples, joystick with buttons looks like:

#pragma config(Motor, motor1, leftMotor, tmotorVexIQ, openLoop, encoder)
#pragma config(Motor, motor6, rightMotor, tmotorVexIQ, openLoop, reversed, encoder)
#pragma config(Motor, motor10, armMotor, tmotorVexIQ, openLoop, encoder)
#pragma config(Motor, motor11, clawMotor, tmotorVexIQ, openLoop, encoder)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

/*------------------------------------------------------------------------------------------------
This program will use the VEX IQ Wirless Controller to drive your Clawbot. This program uses
If/Else statements to provide a “threshold” for the transmitter - this allows your robot to
come to a stop even if the joysticks on the Wireless Controller haven’t perfectly returned to
their zero position.

Note: You will have to set ROBOTC to enable “Wireless Control” to use the VEX IQ joystick.

                        ROBOT CONFIGURATION: VEX IQ Clawbot
MOTORS & SENSORS:
*          [Name]              [Type]                            [Location]
Port 1                    leftMotor           VEX IQ Motor                          Left side motor
Port 6                       rightMotor          VEX IQ Motor                          Right side motor (reversed)
    Port 10                            armMotor                        VEX IQ Motor                                Arm Up/Down motor
    Port 11                            clawMotor                        VEX IQ Motor                                Claw Open/Close motor

------------------------------------------------------------------------------------------------*/

task main()
{
int threshold = 10;
static int leftSpeed = 0;
static int rightSpeed = 0;

while(true)
{
    leftSpeed = (getJoystickValue(ChA) - getJoystickValue(ChB)/2);    // (y - x)/2
    rightSpeed = (getJoystickValue(ChA) + getJoystickValue(ChB)/2);    // (y + x)/2

    if(leftSpeed > threshold || leftSpeed < -threshold)
    {
        setMotorSpeed(leftMotor, leftSpeed);
    }
    else
    {
        setMotorSpeed(leftMotor, 0);
    }

    if(rightSpeed > threshold || rightSpeed < -threshold)
    {
        setMotorSpeed(rightMotor, rightSpeed);
    }
    else
    {
        setMotorSpeed(rightMotor, 0);
    }

    //If Button "L-Up" is pressed in, we'll set the arm motor to run in reverse.
    if(getJoystickValue(BtnLUp) == 1)
    {
        setMotorSpeed(armMotor, -127);
    }
    //If the "L-Up" isn't pressed, but "L-Down" is, we'll set the motor to run forward.
    else if(getJoystickValue(BtnLDown) == 1)
    {
        setMotorSpeed(armMotor, 127);
    }
    else  //If neither button is pressed, we'll set the motor off.
    {
        setMotorSpeed(armMotor, 0);
    }

    //If Button "L-Up" is pressed in, we'll set the arm motor to run in reverse.
    if(getJoystickValue(BtnRUp) == 1)
    {
        setMotorSpeed(clawMotor, -127);
    }
    //If the "L-Up" isn't pressed, but "L-Down" is, we'll set the motor to run forward.
    else if(getJoystickValue(BtnRDown) == 1)
    {
        setMotorSpeed(clawMotor, 127);
    }
    else    //If neither button is pressed, we'll set the motor off.
    {
        setMotorSpeed(clawMotor, 0);
    }
}

}*