P5js (function) is not defined

I’m having problems with this, and I don’t know what it means. Any help?

-Grim

can you post the code that is causing this error? please!

ok:

https://pastebin.com/pLaaueJh

Line #8: this.dna = generateDNA();

Where’s your function generateDNA()? :face_with_raised_eyebrow:

It’s in sketch.js. Will provide all scripts if needed.

@Grimtin10 If you can provide all the code in your program, that would be helpful:-) Have you double checked your setup() and draw() functions?

here ya go:

https://pastebin.com/KGR4qrax

“mySketch, Line 109: this.update is not a function:”
this.update() = function(){

1 Like

OHMYGOD I just noticed the mistake!! there is an extra parenthesis.
Ughhh. Anyway, thanks for answering!!

@Grimtin10 also, function is a reserved keyword

1 Like