Internal Compiler Error

So my game runs the way it should in unity. But when i build it i get this error

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.UnauthorizedAccessException: Access to the path “C:\Users\Marshall\Documents\New Unity Project\Temp\Assembly-CSharp-firstpass.dll.mdb” is denied.

at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0

at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in :0

at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in :0

at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in :0

at Mono.CSharp.SymbolWriter+SymbolWriterImpl.WriteSymbolFile () [0x00000] in :0

at Mono.CSharp.SymbolWriter.WriteSymbolFile () [0x00000] in :0

at Mono.CSharp.CodeGen.Save (System.String name, Boolean saveDebugInfo, Mono.CSharp.Report Report) [0x00000] in :0

at Mono.CSharp.Driver.Compile () [0x00000] in :0

at Mono.CSharp.Driver.Main (System.String args) [0x00000] in :0

Im guessing it had something to do with unity compiling the scripts but i have no idea how to fix it. This is the script that might be causing the problem

using UnityEngine;
using System.Collections;

public class NetworkManager : MonoBehaviour 
{
	public Camera standbyCamera;
	spawnSpot[] spawnSpots;

	void Start () 
	{
	    connect();
		spawnSpots = GameObject.FindObjectsOfType<spawnSpot>();
	}
	
	void connect()
	{
		PhotonNetwork.ConnectUsingSettings("poop v1.0.0");

	}
	
	void OnGUI()
	{
		GUILayout.Label( PhotonNetwork.connectionStateDetailed.ToString() );
	}
	
	void OnJoinedLobby()
	{
		PhotonNetwork.JoinRandomRoom();
	}

	void OnPhotonRandomJoinFailed()
	{
		Debug.Log ("Failed to Join a Room");
		PhotonNetwork.CreateRoom (null);
	}

	void OnJoinedRoom()
	{
		Debug.Log ("Successfully Joied Room");
		spawnMyPlayer();
	}
     
	//section that is most likely causing the problem
	void spawnMyPlayer()
	{
		if(spawnSpots == null)
		{
			Debug.LogError ("WTF?!?!?!");
		}  
		spawnSpot mySpawnSpot = spawnSpots [Random.Range (0, spawnSpots.Length)];
		GameObject myPlayerGO = (GameObject)PhotonNetwork.Instantiate ("PlayerController", mySpawnSpot.transform.position, mySpawnSpot.transform.rotation, 0);

		standbyCamera.enabled = false;
		((MonoBehaviour)myPlayerGO.GetComponent("FPSInputController")).enabled = true;
		myPlayerGO.GetComponent<MouseLook> ().enabled = true;
	}
}

when i say might be causing the problem I mean that is my best guess

Seems you’re having write permission issues, which really shouldn’t happen in your Documents folder. You could have more than one user account on your computer and you (or Unity) is trying to save it in another user’s Documents folder.

Make sure your user account has administrator permissions in Windows. Start->Control Panel->User & Accounts.

Alternative solutions (more than I want to post right now) are to right-click your Documents folder and make sure you have write permissions, or disable UAC.