gamemanual0/gm0

Replace "Motor" with "Servo" in Common Issues NPE

Closed this issue · 0 comments

Where is there misleading or incorrect information?
In this section of the Common Issues page, in the example for the NullPointerException.
What's wrong?
Explain what exactly is incorrect, and ideally what it could potentially be replaced with.

There is shown a Servo object in the code excerpt, however the solution for the incorrect code references a motor. The solution should be changed to read:

This can be fixed moving the “Servo” variable value definition to the init (or runOpMode() in LinearOpModes) method as follows: