View Single Post
  #1   Spotlight this post!  
Unread 15-02-2016, 20:03
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Help ME PLEASE ASAP

Code:
RobotDrive drive = new RobotDrive(1,2,3,4); 

Talon frontLeft = new Talon(4); 
Talon rearLeft = new Talon(3);
Talon frontRight = new Talon(2); 
Talon rearRight = new Talon(1);
You are declaring and initializing a RobotDrive and you are also declaring your drivetrain Talons individually.

You need to do one or the other, but not both. Doing this will throw an error saying you are declaring and initializing all your drivetrain Talons twice.

Pick which way you want to program your robot: either using the simpler RobotDrive object, or by manually coding commands to your individual Talons, then delete all the code for the method you are not using.

In the future, it is also a good idea to post a description of the problem you are encountering, including any exceptions or errors messages.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote