Thread: CodeProblem
View Single Post
  #2   Spotlight this post!  
Unread 15-02-2015, 21:37
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
Re: CodeProblem

Quote:
Originally Posted by AnnaliseDonavan View Post
Button button1 = new JoystickButton(joystick, 1),
button2 = new JoystickButton(joystick, 2),
button3 = new JoystickButton(joystick, 3),
button4 = new JoystickButton(joystick, 4),
button5 = new JoystickButton(joystick, 5),
button6 = new JoystickButton(joystick, 6),
button7 = new JoystickButton(joystick, 7),
button8 = new JoystickButton(joystick, 8),
button9 = new JoystickButton(joystick, 9),
button10 = new JoystickButton(joystick, 10),
button11 = new JoystickButton(joystick , 11);
I think I know what your problem is. If, and if being the key word, button1 works, then my theory is correct. When declaring buttons, you need to have then declared exactly as button1 is declared. Namely, having "Button" before the button name. Hope I helped!