Weird errors in script

I’m getting some weird errors I can’t understand.

var tarZ : float;

var dampX : float;
var dampZ : float;  
var timeSwitch : int = 100;

var death : boolean = false;

var patrolling : boolean = false;
var patrolTar : Transform[];
var currentTar : int;

var projectile : GameObject;
var	GUITextHandler;
var bulletSpawn : Transform;
var countDown : int = 50;

var mats : Material[];
var matCount : int;

function Start(){
	CreateTarPoint();
	matCount = Random.Range(0, 4);
}

function Update(){
	if(target != null){
		transform.GetComponent("NavMeshAgent").destination = target.position;
		transform.LookAt(target);
		countDown--;
		if(countDown <= 0){
			var bullet : GameObject = Instantiate(projectile, bulletSpawn.position, bulletSpawn.rotation);
			bullet.rigidbody.AddForce(transform.forward * 1500);
			countDown = 50;
		}
	}else if(!patrolling){
		if(timeSwitch <= 0){
			timeSwitch = 100;
			CreateTarPoint();
		}else{
			transform.GetComponent("NavMeshAgent").destination = new Vector3(tarX, 0, tarZ);
			timeSwitch -= 1 * Time.deltaTime;
		}
	}
	
	if(death){
		GUITextHandler.score += 100;
		Destroy(gameObject);
	}
	
	if(patrolling && currentTar < patrolTar.Length && target == null){
		transform.GetComponent("NavMeshAgent").destination = patrolTar[currentTar].position;
		
		if(transform.position.x == patrolTar[currentTar].position.x && transform.position.z == patrolTar[currentTar].position.z){
			if(currentTar < patrolTar.Length){
				currentTar++;
			}
			
			if(currentTar == patrolTar.Length){
				currentTar = 0;
			}
		}
	}
	renderer.material = mats[matCount];
}

function CreateTarPoint(){
	dampX = Random.Range(1.0, 3.0);
	dampZ = Random.Range(1.0, 3.0);

	tarX = Random.Range(minTarX, maxTarX) - dampX;
	tarZ = Random.Range(minTarZ, maxTarZ) - dampZ;
}
  1. rgumentException: Illegal characters in path.
    System.IO.Path.Combine (System.String path1, System.String path2) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Path.cs:127)
    UnityEditor.AddComponentWindow+NewScriptElement.TargetPath () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/AddComponentWindow.cs:211)
    UnityEditor.AddComponentWindow+NewScriptElement.CanCreate () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/AddComponentWindow.cs:127)
    UnityEditor.AddComponentWindow+NewScriptElement.OnGUI () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/AddComponentWindow.cs:109)
    UnityEditor.AddComponentWindow.ListGUI (.Element tree, Single anim, UnityEditor.GroupElement parent, UnityEditor.GroupElement grandParent) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/AddComponentWindow.cs:797)
    UnityEditor.AddComponentWindow.OnGUI () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/AddComponentWindow.cs:530)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/GUI/DockArea.cs:241)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/GUI/DockArea.cs:234)
    UnityEditor.HostView.OnGUI () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/GUI/DockArea.cs:126)

  2. Script compilation error: Couldn’t replace Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll

  3. Assets/MecanimTute/Assets/Scripts/bot2.js(53,17): BCE0005: Unknown identifier: ‘GUITextHandler’.

  1. I cant help you if you dont show the code. But you can do it yourself. There are restrictions on filenames that you cannot use. For instance, you cant make a file named “?.txt” on windows.

  2. Try deleting that dll. It is generated by Unity so deleting it would just respawn it.

  3. Seems quite straight forward dont you think?

var GUITextHandler; < lacks variable name.