AppleScript editor cannot save .scpt file

This is happening because .scpt extension is used for compiled scripts, just use .applescript extension and it will work just file.

Yet another example of the stupid coded error messages.