It’s expecting an } , afaik there is one , { at the beginning , } at the end , correctly enclosed
Also error at line 5 noisenv …I checked thousand times I can’t see any syntax error
Modfreq would also be wrong , sorry I don’t see it
It would be highly appreciated if you could show me the error ,
The line above the one you are looking at. This is important. It says it is on line 5, but it is actually at the end of line 4. This will bite you all the time, so it is a good thing to get used to looking for.
And Line 5 meant 4 , since it starts counting from 0 , phew
Not exactly. Line 5 is line 5.
The error was in line 5 because line 4 was not terminated with a semicolon.
The error says: “unexpected NAME, expecting ‘}’”, since the interpreter does not expect new expressions after a statement without a semicolon, it only expects the end of the function (‘}’). “NAME” here refers to “noiseenv”. It’s the same as writing: index =2noisenv= XLine.kr(1,0.001, 0.125);
since newline has no meaning for the interpreter (it does only for the editor and code selection for evaluation).