XCode suddenly stopped formatting and won't compile

For some reason my AppleScript text has turned to plain text instead of formatted and when I try to compile I get:
“Command /usr/binosacompile filed with exit code 1”

I don’t know what happened.

I must have accidentally changed something, but what?

There is an error in your script that is preventing it from compiling.