Trying to make a box rotate, getting error even after p5 check

Heres the error code:
Uncaught SyntaxError: missing ) after argument list (sketch: line 10)
Thats, "rotateX(framecount * 01.0)

function setup() {
createCanvas(400, 400);
}

function draw() {
background(0);
noStroke();
fill(100, 100, 100);
rotateX(framecount * 01.0)
rotateY(framecount * 01.0)
box(45, 45, 45);

}

hi, after 4 topics/ 9 posts it can be expected that you found the

</> code tag button in the editor

to PASTE your code into.

please repair above code posting!


a running version of your code would be

function setup() {
  createCanvas(400, 400,WEBGL);
}

function draw() {
  background(0);
  noStroke();
  fill(100, 100, 100);
  rotateX(frameCount * 0.10)
  rotateY(frameCount * 0.10)
  box(45, 45, 45);
}

your ERROR

0888 // 888 parsed as decimal
0777 // parsed as octal in non-strict mode (511 in decimal)

Note that decimal literals can start with a zero ( 0 ) followed by another decimal digit, but if every digit after the leading 0 is smaller than 8, the number gets parsed as an octal number.

so

01.

seems to be a big NO in javascript
as octal numbers can not be floating point.

4 Likes