Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   requires() error (http://www.chiefdelphi.com/forums/showthread.php?t=133777)

therealdavier 31-01-2015 14:29

requires() error
 
While trying to include a new elevator object in our command based robot, we receive errors specifically with the requires tag. Any ideas?

RufflesRidge 31-01-2015 14:30

Re: requires() error
 
Quote:

Originally Posted by therealdavier (Post 1436601)
Any ideas?

Idea #1, post more information, preferably a link to an online location containing your code. There is not nearly enough information here to help.

Jalerre 31-01-2015 23:40

Re: requires() error
 
I agree, there is not enough information to conclude what the problem is. However I can tell you a solution to a problem we had with the requires statement. Because CommandBase does not exist anymore for you to make instances of all your subsystems, you now have to use requires(Robot.subsystem_instance). If this does happen to be your problem also note that you have to import you commands and subsystems manually now.

Fauge7 01-02-2015 21:34

Re: requires() error
 
Try putting the requires method inside the constructor of the command. If you don't know what a constructor is: it's a method that is called at the time of instantiation or whenever you say new command. To declare a constructor, after the class declaration type "public" and the class name then () and a set of {}

joshmill229 02-02-2015 21:22

You must put it in the robot.java file if using command base
Ex. Elevator = new elevator

Then in the requires(robot.elevator)


All times are GMT -5. The time now is 22:31.

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