hi,

-a- please format your code using the `</> Preformatted text`

button

-b- also post code as short as possible just to show your problem

but complete as in we can copy / paste it into the PDE and it runs…

a running version would be

one cycle

```
void setup() {
step();
}
float x;
float y;
void step() {
float r = random(1);
print("r "+nf(r,0,2)+" x "+x+" y "+y);
if (r < 0.4) x++;
else if (r < 0.6) x--;
else if (r < 0.8) y++;
else if (r > 0.8) y--;
println(" now: x "+x+" y "+y);
}
```

or conti

```
void setup() {}
void draw() {
step();
}
float x;
float y;
void step() {
float r = random(1);
print("r "+nf(r,0,2)+" x "+x+" y "+y);
if (r < 0.4) x++;
else if (r < 0.6) x--;
else if (r < 0.8) y++;
else if (r > 0.8) y--;
println(" now: x "+x+" y "+y);
}
```