Wpilib main erorr java

hi, i have 2 errors in my main file and i don’t know how to fix them i haven’t changed anything the errors i get are:
The method startRobot(Supplier) in the type RobotBase is not applicable for the arguments (Robot::new)

The constructed object of type Robot is incompatible with the descriptor’s return type: T

what do i do to fix them

We would have to see your code to be sure, but it sounds like your Robot class (in Robot.java) no longer extends one of the robot base classes (eg Robot extends TimedRobot). It must do so to work.

this is my main code:

this is my robot code:

i just started working in wpilib so i dont know much i need to create a tank drive and thats what i did

How did you get the Robot.java file? Are you using RobotBuilder? It looks like maybe what happened is you called one of the subsystems in RobotBuilder “Robot” or otherwise overwrote Robot.java with a subsystem class instead of the normal Robot class.

what do you mean? how do i fix that

The Robot class extends SubsystemBase rather than TimedRobot, and overrides/implements the Subsystem methods rather than the TimedRobot methods. While you could try to fix it in place, it’s probably going to be easiest for you to create a new project and just copy the motors/sensors into the correct form of the Robot class.

If you’re using RobotBuilder to make the project, don’t name the subsystem Robot, name it something different.

I’m using command robot

This is what Robot.java should look like for a command-based robot.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.