You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In class today when writing objects and constructor functions, the console would not show a syntax error, but rather show a "no p5" error instead. This came up even with some small things like a missing comma or a + instead of = etc. Unfortunately I wasn't able to track all of them, but there is one that produces the problem. The JS error would be undefined is not a function.
vartest={x: 200,y: 200,show: function(){ellipse(this.x,this.y,100,100);}}functionsetup(){createCanvas(400,400);}functiondraw(){background(0);test.sho();// ERROR IS HERE!}
The text was updated successfully, but these errors were encountered:
We should be printing the second item in the Error stack trace. We could use error.stack but that is not going to work across all browsers. This library may help:
In class today when writing objects and constructor functions, the console would not show a syntax error, but rather show a "no p5" error instead. This came up even with some small things like a missing comma or a
+
instead of=
etc. Unfortunately I wasn't able to track all of them, but there is one that produces the problem. The JS error would beundefined is not a function
.The text was updated successfully, but these errors were encountered: