Help i m beginner and i don't understand whats happend

Hello, my English is bad, I am French!
I uploaded a file to openprocessing to study the mechanism of an automatic write that I need. I am under visualcode … Cannot run the program because I have an error (view in the console) Uncaught ReferenceError: p5ex is not defined at mySketch.js: 157 I’m not very good at it! Can someone explain to me where the error is so that I can run this code. Thank you
This is the file ! WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Please share a link to your sketch on or or include you code in your post here (click the </> button in the toolbar to get proper formatting). I’m not comfortable clicking on the link your provided.

Thank you !
It s NOT mine sketch, it s a sketch i would like study and modify beacaus it s the asemic writing i want to learn !
It work on line but not from Visualcode?

Funny how similar the sketch is to this one Muotoja sanoista - OpenProcessing from 2013 :slight_smile:

The sketch in openprocessing is using an additional JavaScript library:

It contains additional helper functions. Here’s the documentation:
and this seems to be the homepage: p5ex.js | p5ex

And please what is my mistake because it doesn’t work in local in visualcode this is index.html


<script src="mySketch.js" type="text/javascript"></script>

<script src="" type="text/javascript">

</script><script src="" type="text/javascript"></script>="http



When you open your sketch, does the URL look like file:/// or like http://localhost/ ?

Maybe you can open the console, the Network tab, and reload your page, see if any of the files are not found?

But someone else who works with JS should help you. I’m not using it lately. merci

Help with javascript will be very appreciated !

I’m not sure where those 404s are coming from because the original sketch on OpenProcessing doesn’t load any assets. However, one problem I can see is the order that you are including your script files. Your mySketch.js file needs to be included after p5 and p5ex. In fact I couldn’t get it to work while being loaded from <head> at all and had to move it to <body>:

<!DOCTYPE html>
<html lang="en">

	<meta charset="utf-8" />
	<script src="" type="text/javascript"></script>
	<script src="" type="text/javascript"></script>

	<link rel="stylesheet" type="text/css" href="style.css">

	<script src="mySketch.js"></script>

1 Like

Thank you ! Yessssssss ! It s the solution ! I m very very happy !