Holinomic Drive Code C++

Hello. I am trying to program a holonomic drive. I don’t know how to put the two columns of VCS C++ code together but by them selves they work. I left two screenshots of the code below. Any help will be greatly appreciated.

Here is the YouTube video I tried using:

Robot C Holonomic Code:

VCS C++ Holonomic Code I came up with based on Robot C Video and Code:

It doesn’t currently work because you’re assigning two values to the same motor instantly. In order to get it working, just translate the robotC commands into vex c++ and keep the operations.

For example, your first line would be FLC.spin(directionType::fwd, Controller1.Axis2.value() + Controller1.Axis1.value() + Controller1.Axis4.value(), velocityUnits::pct);

I tried that. When I try to do that, the robot would only go forward and backwards with the correct axis. When the robot is supposed to turn left and right, it goes forward and backwards. When trying to turn the robots wheels go in odd directions.

Code Used:

You need to change which axis you + or - in order to make them move in the proper direction in all likelihood.