I am using an if statement to calculate the size of the window, and therefore it needs to go before setup. When I put it before the setup though, I get this error:
processing.app.SketchException: expecting EOF, found 'if' at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:326) at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:197) at processing.mode.java.JavaBuild.build(JavaBuild.java:156) at processing.mode.java.JavaBuild.build(JavaBuild.java:135) at processing.mode.java.JavaMode.handleRun(JavaMode.java:176) at processing.mode.java.JavaEditor$20.run(JavaEditor.java:481) at java.lang.Thread.run(Thread.java:680)
I have a for loop that makes the variable i go up by 1 every time it runs. I want to save the variable x every time the for loop runs, for example, when i = 1, the variable would be x1, when i=3, the variable is x3. But I can't get this to work. Any tips? Thanks.