I experience a strange problem with Processing.
I made a sketch containing many files. Everything worked fine, until I wrote the following function:
When trying to run the sketch, Processing threw an error:
pointing to the closing '}' on the last line of a different file in the sketch.
Strange thing is, the error persists even when I undo all the changes. No matter what I do, I can't get rid of the error.
I also didn't find this in the forum.... sorry if this is known already. I'm fairly new to Processing -.-
edit: even when I copy-paste all the code to a different Processing instance, creating tabs as necessary and save the project with a new name, the error reappears.
Regards, Paul
I made a sketch containing many files. Everything worked fine, until I wrote the following function:
- int[] get_faller_times(int level_in, int stage_in) {
- int[] faller_ts;
- if (level_in == 1 && stage_in == 1) {
- faller_ts = {
- 220,
- 380,
- 400, 450,
- 510, 530,
- 600, 600, 600, 600, 650, 680,
- 800, 820, 840, 860, 880,
- 900, 910, 920, 930, 940, 950, 960, 970, 980, 990,
- 1450, 1450,
- 1550, 1550,
- 1630, 1660, 1690,
- 1720, 1750, 1770, 1790,
- 1850, 1850, 1850, 1850, 1850, 1850,
- 1900, 1910, 1920, 1950, 1960, 1970,
- 2050, 2060, 2070,
- 2100, 2110, 2120,
- 2200, 2200, 2200, 2200, 2200, 2200
- };
- }
- else {
- faller_ts = {
- };
- }
- return faller_ts;
- }
When trying to run the sketch, Processing threw an error:
unexpected token: {
pointing to the closing '}' on the last line of a different file in the sketch.
Strange thing is, the error persists even when I undo all the changes. No matter what I do, I can't get rid of the error.
I also didn't find this in the forum.... sorry if this is known already. I'm fairly new to Processing -.-
edit: even when I copy-paste all the code to a different Processing instance, creating tabs as necessary and save the project with a new name, the error reappears.
Regards, Paul
1