public double getHeight() { double height = table.getNumber("HEIGHT", 0); if (height == 0) { try{ height = SmartDashboard.getNumber("Height"); }catch(@SuppressWarnings("deprecation") NetworkTableKeyNotDefined e){ System.out.print(e.getStackTrace()); SmartDashboard.putNumber("Height", table.getNumber("HEIGHT", 0)); } } if (height != 0) targetVisible = true; else targetVisible = false; return height; }