We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi Folks,
I am very new to coding (about 3-5 months). I'm trying to convert some Processing(Java) code to P5.js. The processing code has a Class in it, so I'm trying to use the prototype function approach to converting the code.
Mostly going fine accept when I'm trying to execute a for loop. I'm trying to use the length of a variable in my function in the loop, which works in the Processing sketch. However, the "Uncaught TypeError: Cannot read property 'length' of undefined" keeps popping up.
Can anyone help please? I'll attach a screen shot of the code.
Answers
how is howManyLines defined in the processing sketch?
pictures of code are terrible. would be better if we could run the example without having to type it in.
Ah, forget it. 'length' wasn't in the original Processing sketch, which means it was the wrong syntax to being with. Program still not working, but no errors coming up... Narg. Back to the drawing board, sorry!