Error CS0103 for no reason

The Unity editor has been giving me this error whenever I try to build my game:
“The Name ‘UnityEditor’ does not exist in the current context”
And it’s a simple script that quits the game when the button is pressed, both in-game and within the editor.

Look at gjf’s comment below the main question; that’s the answer.