Why do I get unexpected char error?

I get unexpected char BCE0044 “o”

var hit6 : RaycastHit;
if (Physics.Raycast(transform.position, transform.forward, hit6, 3)) {
    if ((hit6.collider.gameObject.tag == "Door") && (Door.oldGateState == oldGateStates.locked) )
        if(gotKey){
        Door 1.Open();
    }
}

What is the line 5 for ?

Door 1.Open(); contains a space char, is it normal ?

var hit6 : RaycastHit;
if (Physics.Raycast(transform.position, transform.forward, hit6, 3)) {
    if ((hit6.collider.gameObject.tag == "Door") && (Door1.oldGateState == oldGateStates.locked) ) {
        if(gotKey){
            Door1.Open();
        }
    }
}

I added brakets to the second “if” statement.