The reason why it's not working is because the translation from french turned to be different.
the french verb "nettoyer" means " to clean" in english.
You just have to remove "spaces" added by the translation.
or just copy/paste the whole "original" source and you'll see the difference.
Because the translation is expecting french language, it tries to translate everything, even programming language, which is english.
The solution is simple :
You should not use translation software to translate source code.
Quote:int displacementX;
int X;
void setup () {
size(400,400); // mock face
X = 0; // position horizontal
displacementX = 1; // displacement
noStroke(); // not of feature
fill(0,0,0,255); // filling black
}
void draw() {
toclean();
tomove();
torebound();
todraw();
}
void toclean() {
background (255);
}
void torebound() {
if (X > width) {
displacementX = -1;
}
if (X < 0) {
displacementX = 1;
}
}
void tomove() {
X = X + displacementX;
}
void todraw() {
rect (X, 195,10,10);
}