This issue is difficult to pin down or describe. It seems that certain script errors can persist between editing previews, or indeed missions. To be more specific: -
If a script error occurs during a preview and is subsequently addressed and previewed again, there are occasions where random errors are thrown where there were none before. A game restart and preview of the mission appears to fix the issue.
This issue was originally to report that the script command "detach" was not working. There appeared to be absolutely no reason for "detach player" to throw a syntax error:
"detach |#|player"
"missing ;"
I originally reported this as a problem with the detach command, but have found that is is functioning correctly in a later editing session after a game restart. On reflection, there may have been a typographic error at some point before the problem appeared, so the assumption is that the error persisted between previews, and caused the syntax error.
This is an overt example where there is very little scope for incorrect syntax, and can be identified as a spurious error. There may however, be many more subtle errors that stem from the root cause as this one. {F19525}