-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text is not a function #1314
Comments
can you include the simplest bit of code that demonstrates the problem, and also list the version of p5.js you're using? thanks |
p5 version : 0.4.23
|
Do you perhaps have a name clash between a variable in global scope and a p5 method? This will generate the very error you see. |
I think @pete-rai is correct, a line like |
What @tafsiri says is right. I think I have something like that in my code I didn't realise that would break it. |
thanks all for your help debugging. maybe there is some warning we could raise if a user tries to overwrite a p5 function? or maybe we just need more documentation making it clear this will break things. cc @toolness |
Wow this community is really awesome :o, |
Absolutely!! I really like it when problems like this are reported b/c it makes us brainstorm ways we can help ensure that users of p5 don't get frustrated in the future 😁 P.S. - Welcome to Github and p5! |
I might not be a pro at coding but i do know that i've used this function yesterday and i think around 14^14 times and nothing changed since yesterday. is it my fault or is this something that's wrong in p5?
full details:
draw @ sketch.js:71
p5.redraw @ p5.js:16412
(anonymous function) @ p5.js:11813
(anonymous function) @ p5.js:11714
p5 @ p5.js:11976
_globalInit @ p5.js:8482
the p5.js editor gives a different error:
72: Uncaught TypeError: string is not a function
The line of code that's being the problem:
text("test",100,200);
The text was updated successfully, but these errors were encountered: