Hello, I am having 2 errors error with this program: I am trying to make an H-drive base go forward, backward, and sideways in both directions. The errors say,
Error:Variable ‘speed’ declaration must be qualified with type. Type ‘short’ used.
Error:Variable ‘time’ declaration must be qualified with type. Type ‘short’ used.
both are on line 8.
#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(speed=50, time=1000)//positive is right, negetive is right //time is in milliseconds
{
motor = speed
wait1Msec(time)
}
task main()
{
forward(1, seconds);
backward(1, seconds);
sideways();
sideways(-50);
}