sketch.js
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
}
Console
p5 had problems creating the global function “createElement”, possibly because your code is already using that name as a variable. You may want to rename your variable to something else.
same issue notated here June
kll
September 2, 2019, 11:46pm
2
the sketch.js code part is ok,
so you damaged the HTML part?
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<meta charset="utf-8" />
</head>
<body>
<script src="sketch.js"></script>
</body>
</html>
what environment you are in?
using operating system ? and browser ?
src=“https://editor.p5js.org/Deseingalt/sketches/mJ2OcMqkI ”
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<meta charset="utf-8" />
</head>
<body>
<script src="sketch.js"></script>
</body>
</html>
This new behavior occured since September 1,
other things, fill(‘red’) generate an error, and sounds occur where there was’nt
I use chrome with a asus chromebook…
kll
September 3, 2019, 7:56am
4
i can not open the link to your sketch!
but your latest sketch “words 2” p5.js Web Editor
run here ( Win10 / Firefox ) well.
but try one of mine, with old 0.7.3
A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.
if that is the reason.
that can come from preferences icon / settings / Accessibility / lint warning: sound must be OFF
so anyhow that is a thing, try your sketch when you are log in / or out.
the answer was here
Yes, the plain-text and table-text boxes were checked (don’t know why).The plain-text box check causes the error.
thanks for help helping
1 Like
kll
September 3, 2019, 10:56am
6
[CTRL][SHIFT][1] switch that ON ( [2] OFF )
give errors?? and also some sound, ( but that LINT sound can be much more confusing… happened to me ?? )
and that’s how i found out about that it only happens when login…