Did you paste it directly into Script Editor? I’ve had problems before when I forgot and pasted into another editor and saved that way.
More information about formatting options
Did you paste it directly
Did you paste it directly into Script Editor? I’ve had problems before when I forgot and pasted into another editor and saved that way.