Vex Coding Studio Help!!!

This code is not going in chronological order:

int howMany = 10  ;
int howmany = -10 ;

LeftDrive.startRotateFor(howMany, rotations);
RightDrive.startRotateFor(howmany, rotations);
LeftDrive.rotateFor(howMany, rotations);
RightDrive.rotateFor(howmany, rotations);

What language?

Never use two variables that look the same with only a capitalization difference to tell them apart. This is a Bad Idea. The variables “howmany” and “howMany” will cause you problems some day. It is not maintainable code. Better choices would be something “LeftRotations” and “RightRotations.”

In addition to @Rick Tyler 's very good point about variable names…

Are you sure it’s not running properly? Do you know you have a mix of non-blocking and blocking functions in there? What do you think your code is supposed to get the robot to do?

One thing I have noticed is that whenever you are using encoder values from the motors in autonomous or driver, you have to make sure to use each motor individually if you want the motors to spin individually. The program will run all the code repeatedly if there are no wait timers or sensor checks in between each line. A sensor check will check for values in a certain threshold and until the motor hits those values it will keep running. Maybe try putting a wait timer or a sensor check after each line of code if you want each to run individually.
eg. (for c++)

LeftDrive.rotateFor(howMany, rotations);
while( !(LeftDrive.rotations(rotations) < (howMany + 1) && LeftDrive.rotations(rotations) > (howMany - 1))) 
{
    vex::task::sleep(2);
}

This will keep running the individual motor until it reaches the point that you want. The reason I add +1 or -1 is because I want to take other external variables into account such as friction or build quality.

Also, make sure to reset you sensor values before and after you use this kind of code. Otherwise you will get stuck in an infinite loop. Since you are doing rotateFor, it is relatively moving the motors.

No, it won’t. Only what is in a loop of some sort (including things like threads looking for events) will be run repeatedly.

This is totally unnecessary and over-complicates things drastically. Take a look at blocking v. non-blocking functions. Blocking functions stop the code at that line until it is complete and then move on. Non-blocking functions fire off some command and let the code keep going while that command looks for its completion. So if you want each one done individually, all you have to do is use a blocking function like rotateFor each time (and avoid including the optional Boolean as false in the end of its parameters).

I’m sorry for the lack of clarity in my message. I was basically saying what @callen said. I should have emphasized wait timers more. The code that I had is basically a version of a non-blocking function. We use it in our drive and turn PID.