My code crashes when I press a button

Whenever we push the button to activate our command the robot disables itself and we get a null pointer exception.
(here’s the github)

The exception message should tell you which line it came from. See what variable was null, and find out why it wasn’t initialized.

1 Like

The variable is being initialized in constants.
The variable is SHOOTER_SPEED

What’s the full line of code? A double variable can’t be null. NPEs occur when you try to do a.something() when a is null.

We found the issue, it was a typo where we were executing the command. We got it fixed now though. Thanks for the help!