# These functions doesn't exist, why?

**URL:** https://discourse.processing.org/t/these-functions-doesnt-exist-why/5489
**Category:** Coding Questions
**Created:** [November 13, 2018, 4:27am UTC](https://discourse.processing.org/t/these-functions-doesnt-exist-why/5489 "2018-11-13T04:27:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lyndsee](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@lyndsee](https://discourse.processing.org/u/lyndsee)
#### Post date: [November 13, 2018, 4:27am UTC](https://discourse.processing.org/t/these-functions-doesnt-exist-why/5489/1 "2018-11-13T04:27:12Z")

</div>

Hi all! I am new here, specifically signed up to resolve this problem.

I have Processing 3. I am trying to make two “walkers”. I have all this code here but I keep getting the error message that the functions step(), render(), don’t exist. Any ideas why?

```auto
> Walker w1;
> Walker w2;
> 
> void setup()
> {
> size( 800,600 );
> background ( 255 );
>   
> w1 = new Walker();
> w2 = new Walker();
> }
> 
> void draw()
> { 
> w1.step();
> w1.render();
>   
> w2.step();
> w2.render();
> }
> 
> class Walker
> {
> float x;
> float y;
> int stepSize;
>   
> Walker()
> {
> x = width / 2;
> y = height / 2;
> stepSize = 8;
> }
>   
> void step()
> {
> int choice = int( random( 4 ) );
>     
> if (choice == 0) // up
> {
> y = y - stepSize; 
> }
> else if (choice == 1) // down
> {
> y = y + stepSize;
> }
> else if (choice == 2) // left
> {
> x = x - stepSize; 
> }
> else if (choice == 3) // right
> {
> x = x + stepSize; 
> } 
> }
>   
> void render()
> {
> noStroke();
> fill( random(256), random(256), random(256) );
> ellipse(x,y,8,8);
> }
> }

```

Any insight would be much appreciated. Thank you!

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 13, 2018, 5:11am UTC](https://discourse.processing.org/t/these-functions-doesnt-exist-why/5489/2 "2018-11-13T05:11:00Z")

</div>

after deleting all the "\> "  
your code runs just fine here.

> win7 / processing 3.4 / JAVA mode /

i noticed that actually there is no need for 2 different methods, one “display” can do both.

and clean pasted here using the

> \</\>

formatter:

```auto
Walker w1;
Walker w2;

void setup() {
  size( 800, 600 );
  background ( 255 );
  noStroke();
  w1 = new Walker();
  w2 = new Walker();
}

void draw() { 
  w1.make();
  w2.make();
}

class Walker
{
  float x, y;
  int stepSize;

  Walker() {
    x = width / 2;
    y = height / 2;
    stepSize = 8;
  }

  void make() {
    int choice = int( random( 4 ) );
    // println(" choice: "+choice);
    if (choice == 0) y = y - stepSize; // up
    else if (choice == 1) y = y + stepSize; // down
    else if (choice == 2) x = x - stepSize; // left
    else if (choice == 3) x = x + stepSize; // right
    fill( random(256), random(256), random(256) );
    ellipse(x, y, stepSize, stepSize);
  }
}

```

but you could need a check on if a walker hits the window border.
