When programming a drive the general ideas is to add up all the values for the wheels, this may incude forward, sideways, left, right and/or turn. This picture shows the direction each wheel should go for mecanum wheels…
Using this your code should look something like this…
int forward = /*your value*/;
int sideways = /*your value*/;
int turn = /*your value*/;
frontRight.spin(vex::forward, forward - sideways + turn, vex::percent);
frontLeft.spin(vex::forward, forward + sideways - turn, vex::percent);
backRight.spin(vex::forward, forward + sideways + turn, vex::percent);
backLeft.spin(vex::forward, forward - sideways - turn, vex::percent);
Also note that the reason you add up the values is to allow the robot to do multiple of these actions at once. Meaning it can drive diagonally by setting forwards and sideways to some values.
Next for driver control the three variables need to be set by the joystick values. You said that…
Whilst certainly possible, this type of control probably would not work very well for the drivers. With tank drive it is hard to keep the joysticks at exactly zero horizontally, so the robot would always be moving sideways a little while driving, which could be annoying. Most use an arcade drive. This places forward and sideways movement on one joystick and turning on the other.
Still feel free to try both ways…
How you asked
int left = Controller.Axis3.position(vex::percent);
int right = Controller.Axis2.position(vex::percent);
int sideways = Controller.Axis4.position(vex::percent);
//you can also calculate this...
int turn = (right - left) * 0.5;
int forward = (right + left) * 0.5;
frontRight.spin(vex::forward, right - sideways, vex::percent);
frontLeft.spin(vex::forward, left + sideways, vex::percent);
backRight.spin(vex::forward, right + sideways, vex::percent);
backLeft.spin(vex::forward, left - sideways, vex::percent);
Arcade Drive
int forward = Controller.Axis3.position(vex::percent);
int sideways = Controller.Axis4.position(vex::percent);
int turn = Controller.Axis1.position(vex::percent);
frontRight.spin(vex::forward, forward - sideways + turn, vex::percent);
frontLeft.spin(vex::forward, forward + sideways - turn, vex::percent);
backRight.spin(vex::forward, forward + sideways + turn, vex::percent);
backLeft.spin(vex::forward, forward - sideways - turn, vex::percent);