View Single Post
  #2   Spotlight this post!  
Unread 10-02-2014, 21:18
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: NetworkTables Null Pointer Exception

There's a second overloaded getNumber() method that takes two parameters, the name and a default value. If it can't find the named value, then the default value is supplied instead of the error being thrown. Take a look at this example:

http://wpilib.screenstepslive.com/s/...client-pc-side
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote