Syntax Errors on Detection Script

Hello all. I have three really simple errors and I can’t figure them out. I feel like I am missing something small like a bracket. Take a crack at it, maybe I just need an extra pair of eyes. Thanks alot.

_

  1. (25,18): BCE0044: expecting ), found ‘=’.
  2. (25,20): BCE0043: Unexpected token: false.
  3. (27,6): BCE0044: expecting :, found ‘=’.

_

var playAni : MonoBehaviour;
var handelRotate : MonoBehaviour;
var doorNotReady : boolean = false;
var waiting : boolean = false;
var left : boolean = false;

function OnTriggerEnter () {

//When entered, the door is delared ready and it starts an animation

left = false;
doorOpen = true;
waiting = true;
wait();

playAni.PlayOpen();
handelRotate.PlayOpen();

}

function OnTriggerExit () {

//If the door is not ready, and player has left, close the door

if (doorNotReady = false) {

left = true;

playAni.PlayClose();
handelRotate.PlayClose();

}

}

function wait () {

//Wait for two seconds then declare the door is not ready

yield WaitForSeconds(2);

doorNotReady = false;

}

function Update () {

//When it has waited, and the person is out of the collider, open the door

if (doorNotReady = false && waiting = false && left = true) {

playAni.PlayClose();
handelRotate.Play

}

It’s just one error actually causing all three. In an if() statement, you need two equals signs.

Change if (doorNotReady = false) to if (doorNotReady == false)

OR

if(!doorNotReady)