title: I keep trying to run my program and one of my classes keeps sending me this error "d.r cannot be resolved or is not a field"
body: <p>I keep trying to run my program and one of my classes keeps sending me this error</p>
  
  <blockquote>
    <p>"d.r cannot be resolved or is not a field" </p>
  </blockquote>
  
  <p>the deer is supposed to be apart of a frogger-type game where they have to get to one side of the road without being hit by cars. The deers regenerate every time it gets to the street sign at the other side of the road. </p>
  
  <pre><code>class Deer {
      float r; // radius
      float x, y; // location
      color col;
  
      Deer(float tempR) {
          r = tempR;
          x = 500;
          y = 250;
          col = color(50, 10, 10, 150);
      }
  
      void setLocation(float tempX, float tempY) {
          x = 500;
          y = 250;
      }
  
      void display() {
          //moveYourDeer Right();
          fill(255);
          ellipse(x, y, r * 2, r * 2);
      }
  
      void moveYourDeerLeft() {
          if (keyPressed) {
              if (key == 'a' || key == 'A') {
                  r--;
              }
          }
      }
  
      void moveYourDeerRight() {
          if (keyPressed) {
              if (key == 's' || key == 'S') {
                  r--;
              }
          }
      }
  
      void moveYourDeerForward() {
          if (keyPressed) {
              if (key == 'w' || key == 'W') {
                  r++;
              }
          }
      }
  
      void moveYourDeerBackwards() {
          if (keyPressed) {
              if (key == 'z' || key == 'Z') {
                  r++;
              }
          }
      }
  
      boolean intersect(StreetSign d) {
          // Calculate distance
          float distance = dist(x, y, d.x, d.y);
  
          // Compare distance to sum of radii
          if (distance &lt; r + d.r) {
              return true;
          }
          else {
              return false;
          }
      }
  
      // If the deer is caught by sign
      void caught() {
          // Stop it from moving by setting speed equal to zero
          speed = 0;
          // Set the location to somewhere way off-screen
          y = -1000;
      }
  }
  </code></pre>