I need help to do autonomous but with voids

Given that computers represent everything in binary, the different types (int, double, and float for example) have different amounts of data they can store and the computer interprets the data stored there differently.

Just a heads up, you can use [code] ... [/code] tags to have code formatting. It makes it much easier to read. You do not need to say void every time you call a function. in void autonomous, just do

//Drive command.
goForward();
//Below you put wait command.
vex::this_thread::sleep_for(1000);

Other suggestions:
First, you are using spin commands for your functions, this is all well and good, but you might have some unintended consequences. The spin command does not put a stop for the motor, so the motor would just keep running. I would make a stop function. It will also get tiring to type everything multiple times. I would suggest you make a function that takes a wait time as an argument, then put the motor spinning, waiting, and motor stopping all in the same void. That could be what you meant by

Read about arguments and parameters here

2 Likes

@DRow can we please get a merge with

@RedGazer you don’t need to make more than one topic for the same question.

Also slightly my fault for not seeing the other one.

1 Like

(I’ve merged 2 posts from a duplicate thread into this one)

6 Likes

yeah I added the stop parameter in the void