I ran into a problem where a 'phantom' script was showing up in my game, in the form of ScriptXXXXX, where the X's were numbers. In my instance, Studio was convinced that this resource lived in the RESOURCE.045 file (which didn't exist).
I couldn't open it the script because it really wasn't there. I tried rebuilding resources, and sometimes the phantom would change script numbers, but would never be removed. If I opened the game in Companion, it does not report the phantom (go figure). Closing & reopening Studio didn't help. I even considered that my resources were truely corrupt, so I rebuilt it & the map using external utilities.
Having this phantom script resulted in a failure to compile - it would attempt to find the script at compile time & it couldn't. I'm running Studio on my 64 bit Win 7 laptop, in XP compatibility mode. Here is the workaround that I came up with:
1) Open Studio
2) Turn off the script preview window (if you don't do this, a right-click in the next step would generate an error)
3) Right click the 'phantom' resource (Game Explorer->Scripts) & choose 'Delete' - Studio will complain that it can't delete the file
4) Rebuild resources
Yeah. Seriously.