Error when building

Hi i get an error when building it seems to only be one script it was working and building fine yesterday but suddenly it causing an error anyone have an idea on a fix

Assets/RPG 2.0/Scripts/UI/GUIResources.cs(3,7): error CS0246: The type or namespace name `UnityEditor’ could not be found. Are you missing a using directive or an assembly reference?

I need to get this fixed asap as its stopping me patching my game

so far i tried
deleting then reimporting a fresh version of the script
reimport project (it crashed half way through so might be corrupt data somewhere)

The error is only on this one script (so far) is this just something was corrupt and need reimport project or is it a script error

I get the same error when I try do a build.

I just commented out the lines of code for the moment. I’m sure theres probably some pre-processor that can be used to remove the code during build.

You dont need UnityEditor code in your release builds anyway.

here you go… "UnityEditor" namespace not found... - Questions & Answers - Unity Discussions

and heres some more info… Unity - Manual: Conditional compilation

thanks it worked but not it crashes every time i change between linux build and mac/windows etc