Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   <indentifier> expected error (http://www.chiefdelphi.com/forums/showthread.php?t=80921)

greekgod8591 01-23-2010 12:05 PM

<indentifier> expected error
 
Hey,
Our team is using our robot from last year and trying to test out and get ourselves a taste of the java. We are just trying to make a SimpleRobot and we can't get past this error.

C:\Users\Alex\Documents\NetBeansProjects\TestProje ct\src\edu\wpi\first\wpilibj\templates\2577_V1.jav a:21: <identifier> expected
public class 2577_V1 extends SimpleRobot {

our code:

import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;

public class 2577_V1 extends SimpleRobot {

RobotDrive rDrive = new RobotDrive(1,2,3,4);
Joystick lStick = new Joystick(1);
Joystick rStick = new Joystick(2);

public void autonomous() {

}

public void operatorControl() {



while(true && isEnabled() && isOperatorControl()) {
rDrive.tankDrive(lStick, rStick);
}

}
}

any help would be much appreciated!

derekwhite 01-23-2010 10:04 PM

Re: <indentifier> expected error
 
I should really know this definitively, but here's a hunch: Try starting the class name with a letter instead of a number. Good luck!

Jared Russell 01-23-2010 10:39 PM

Re: <indentifier> expected error
 
Quote:

Originally Posted by derekwhite (Post 905641)
I should really know this definitively, but here's a hunch: Try starting the class name with a letter instead of a number. Good luck!

This is correct.


All times are GMT -5. The time now is 08:56 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi