Hello again, and first I wanted to thank the community here for being so helpful on my first post. In my second again I’m met with errors that I have no clue how to remedy. Attached is my code and a stack trace (? I still am very fuzzy about stack traces so this may be the wrong thing), regarding my first error.
Error at java.base/java.util.Objects.requireNonNull(Objects.java:246): Unhandled exception: java.lang.NullPointerException: Parameter joystick in method JoystickButton was null when it should not have been!
Check the stacktrace to find the responsible line of code - usually, it is the first line of user-written code indicated in the stacktrace. Make sure all objects passed to the method in question were properly initialized - note that this may not be obvious if it is being called under dynamically-changing conditions! Please do not seek additional technical assistance without doing this first!
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam(ErrorMessages.java:27)
at edu.wpi.first.wpilibj2.command.button.JoystickButton.(JoystickButton.java:27)
at frc.robot.RobotContainer.configureButtonBindings(RobotContainer.java:60)
at frc.robot.RobotContainer.(RobotContainer.java:39)
at frc.robot.Robot.robotInit(Robot.java:30)
at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)
at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:373)
at edu.wpi.first.wpilibj.RobotBase.lambda$startRobot$0(RobotBase.java:443)
at java.base/java.lang.Thread.run(Thread.java:829)
Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:388): The robot program quit unexpectedly. This is usually due to a code error.
Here is my Github: https://github.com/W-Sweet/In_The_End/tree/master/src/main/java/frc/robot
Secondly, I’ve been trying to get my code to work on multiple computer using github repositories, but I keep getting this error:
The terminal process failed to launch: Invalid starting directory “\W-Sweet\RepositoryName”, review your terminal.integrated.cwd setting.
I know this has something to do with the fact that the code doesn’t exist on the computer and that it’s not created as a FRC project, but I’m confused about how to fix it. The only solution I got now, is that I create a new frc project and copy all of my code every time.
Regardless, thank you everyone, and feel free to ask me any questions. Sorry if these may be simple answers.