Open Hinomupi opened 5 years ago
Hi @Hinomupi ! I noticed your comments in Portuguese. You can send me an email abav (at) lugaralgum (dot) com. To make the code formatting work here you can use tripple-backticks (```) on a line before and after the code.
This question probably belongs in the Processing forums, and not here.
The code sample you've provided is not complete, and would not cause the error you describe.
FileNotFoundError
(I looked at the docs) but I could be wrong.Things you could also watch out:
I just edited the post to include where the error occours (what line Processing highlights)
Look, you can't use variables inside size()
!
Try removing or commenting out size()
.
And I'm using IOError
instead of FileNotFoundError
Now bolinhas()
is undefined... you should close this :)
bolinha is a class I've defined before, I've only pasted here what I'm defining to be setup().
I wanted to make a program that sets the size of the window according what's set in settings.txt. If I can't use variables inside size() is there any way for me to do this?
edit: The reference in py.processing says "As of Processing 3.0, to use variables as the parameters to size() function, place the size() function within the settings() function (instead of setup()). There is more information about this on the settings() reference page.", however I couldn't find the reference page for settings in py.processing. So I went to the reference in processing.org and now I've managed to fix my problem. Thanks for the help, villares!
I'm new to programing. I wrote a program and I'm getting the error "NameError: global name 'taman' is not defined" even though I have already defined taman. Here's the code:
While it does print the elements of taman when I convert the strings to integers or floats, it raises the error in this line:
Did I do something wrong or is this a bug?