Unofficial: H-drive programming problem

Only RobotC staff can answer your question in the ROBOTC Tech Support channel. You may get a faster response if you ask the question in the UNOFFICIAL Tech Support channel.

When you declare your function you need to specify what type of variable you are using.
So I added an int in front of speed and time:

void sideways(int speed=50, int time=1000)

and semicolons


following the two statements in the function.

#pragma config(Motor,  port2,           left1,         tmotorVex393HighSpeed_MC29, openLoop, driveLeft)
#pragma config(Motor,  port3,           right1,        tmotorVex393HighSpeed_MC29, openLoop, reversed, driveRight)
#pragma config(Motor,  port4,           left2,         tmotorVex393HighSpeed_MC29, openLoop, driveLeft)
#pragma config(Motor,  port5,           right2,        tmotorVex393HighSpeed_MC29, openLoop, reversed, driveRight)
#pragma config(Motor,  port6,           center,        tmotorVex393HighSpeed_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

void sideways(int speed=50, int time=1000)//positive is right, negetive is right //time is in milliseconds
	motor = speed;
task main()

forward(1, seconds);
backward(1, seconds);


WOW, you beat me by like 6 seconds.

And they still didn’t read either of our posts!!

@Javapower Hey, look over here!

@Javapower, look here. Also, why “java power” It’s not like Java is a really powerful language or anything :wink: