Quad Motors RobotC

I’m trying to program quad wheels for 4 vex motors to allow straifing during a match. ill post what i have for the Competition code below, but otherwise i am at a loss. I already attempted to program quad wheels in RobotC, however they just ended up messing up the general control of the wheels.

The Code

task main()
{
bMotorFlippedMode[port2] = true;

while (1 == 1)
	{

///quad wheels
motor[port1] = vexRT(Ch3);
motor[port2] = vexRT(Ch3);
motor[port9] = vexRT(Ch2);
motor[port10] = vexRT(Ch2);

///straifing
///motor[port1] = vexRT(Ch4);
///motor[port2] = vexRT(Ch4);
///motor[port9] = vexRT(Ch1);
///motor[port10] = vexRT(Ch1);
///arm control
if (vexRT[Btn5U] == 1)
{
motor[port5] = -127;
motor[port6] = 127;
motor[port7] = 127;
motor[port8] = 127;

	}
else if (vexRT[Btn5D] == 1)
	{
			motor[port5] = 127;
			motor[port6] = -127;
			motor[port7] = -127;
			motor[port8] = -127;
		}

///claw control
else if (vexRT[Btn6D] == 1)
{
motor[port3] = -127;
}
else if (vexRT[Btn6U] == 1)
{
motor[port3] = 127;
}
else
{
motor[port3] = 0;
motor[port5] = 0;
motor[port6] = 0;
motor[port7] = 0;
motor[port8] = 0;
}
}
}

Not exactly sure what you are asking here. If you are interested in the code for an X drive or drive using Mecanum wheels then have a look at this thread.
https://vexforum.com/t/holonomic-drives-2-0-a-video-tutorial-by-cody/27052/1

If the issue was wanting different joysticks to control the same motors then you need to use some variables like this so values are only sent to the motors once (although I don’t think is what you really wanted)

    int  port1_speed;
    int  port2_speed;
    int  port9_speed;
    int  port10_speed;
    
    if( abs(vexRT[Ch3]) > 10 ) {
      port1_speed = vexRT[Ch3];
      port2_speed = vexRT[Ch3];
    }
    if( abs(vexRT[Ch2]) > 10 ) {
      port9_speed  = vexRT[Ch2];
      port10_speed = vexRT[Ch2];
    }
    if( abs(vexRT[Ch4]) > 10 ) {
      port1_speed = vexRT[Ch4];
      port2_speed = vexRT[Ch4];
    }
    if( abs(vexRT[Ch1]) > 10 ) {
      port9_speed  = vexRT[Ch1];
      port10_speed = vexRT[Ch1];
    }

    ///quad wheels
    motor[port1]  = port1_speed;
    motor[port2]  = port2_speed;
    motor[port9]  = port9_speed;
    motor[port10] = port10_speed;