Go to Post Teams that TRY to win and TRY to do their best end up having students that learn more, learn the value of hard work, and are inspired by the process. - Chris Hibner [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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