Cabbage Logo
Back to Cabbage Site

Seemingly random "Unexpected ENDIN_TOKEN" error

Sometimes when I try to run my code, seemingly randomly, it gives me this error:

error: syntax error, unexpected ENDIN_TOKEN  (token "endin") from file C:\Users\jason\Documents\Cabbage\Live Performer.csd (1)
line 73: endin
Parsing failed due to invalid input!
Stopping on parser failure
cannot compile orchestra
WARNING: Csound not ready for performance: csoundStart() has not been called

This seems to happen independent of anything in my code. I ran the code once, and it worked. I ran it again and it gave me that error. The thing that I think is strange is that the example projects work fine, but anything that I’ve coded doesn’t work, even if it has worked
for a long time. After a while everything works again, but I wish I knew what was causing it. The only thing that seems to be sort of linked to it is that I have

f0 z
i1 0 z

in the CsScore section, but when I change those, nothing changes. If you need to know more information about the code, I can tell you, but I don’t know if it’s linked to the issue.

Thanks!

Strange, that’s a Csound issue and it’s clearly pointing to an unexpected endin. Can you post one of the .csd file that is causing the problem?

Yeah, here you go. The code is pretty messy and unfinished, but it’s a work in progress.
Live Performer.csd (1.6 KB)

You’ve unmatched if/endifs. Add an endif on line 57 and you should be good to go.

Thank you, That works flawlessly! I can’t believe I didn’t notice that before, I guess it just took some fresh eyes to see it. Thank you!

1 Like