passing error CS8025 with Doors

I have been trying to make a door that can be opened and closed for a college assignment, but when I try to test it out. monobehaviour says there is a parsing error and I don’t know why. Any help is appreciated.
My script:
private var guishow : boolean = flase;
private var isopen : boolean = false;

var door : GameObject;

var raylength = 10;

function update ()
{
var hit : RaycastHit;
var fwd = transform.TransformDirection(vector3.foward);

if(Physics.Raycast(transform.position, fwd, hit, raylength))
	(
		if(hit.collider.gameobject.tag = "Door")
		(
			guishow = true;
			if(input.GetKeyDown("e") && isOpen = false)
			(
				door.animation.play("DoorOpen");
				isOpen = true;
				guishow = false;
			)
			else if(input.GetKeyDown("e") && isOpen = true)
			(
				door.animation.play("DoorClose");
				isOpen = false;
				guishow = false;
			)
		)	

	)
else
	(
		guishow = false;
	)
}

function onGUI()
{
if(guishow = true && isopen = false)
(
GUI.Box(Rect (Screen.width / 2, Screen.height / 2, 100, 25), “Use Door”);
)
}

Dude, all your IF, ELSE IF and ELSE are having () instead of {}, () are for condition section and {} are for code section and you have used () in your code section too which will make unity compiler angry

At a glance…

Typos:

  • private var guishow : boolean = flase; should be false;

Case-sensitivity:

  • onGUI should be OnGUI
  • update should be Update
  • isOpen should be isopen (or the other way around - but be consistent)
  • vector3.forward should be Vector3.forward
  • input should be Input

Incorrect Syntax:

  • if (hit.collider.gameobject.tag = “Door”) should be if (hit.collider.gameobject.tag == “Door”)
  • if(input.GetKeyDown(“e”) && isOpen = false) should be if(Input.GetKeyDown(“e”) && isOpen == false)
  • if(guishow = true && isopen = false) should be if(guishow == true && isopen == false)
  • code blocks should be enclosed in {curly brackets} not (round brackets)

When writing code, I seriously recommend you write little sections at a time, test, correct any errors, write the next bit, test, correct any errors. Otherwise you end up with a huge mess that can take some time to untangle.