UCE0001: ';' expected. Insert a semicolon at the end.

I was editing my script when suddenly i got this error. Ive checked every single line for a missing semicolon and they are all there. What’s the error?
Here’s the full code:

 var Highlighted : boolean;
    var ChosenColour : Color;
    var GotKey : triggerkey.GetComponent(prompt_open)=boolean;
    var PickUp : String = "Abriste la puerta!";
    function OnMouseOver() {
        transform.GetComponent.<Renderer>().material.color = ChosenColour;
        Highlighted = true;
    function OnMouseExit(){
        transform.GetComponent.<Renderer>().material.color = Color.white;
        Highlighted = false;
    function CheckKey(){
        transform.GetComponent.GotKey = boolean;
        if (GotKey == true ){
                if(Highlighted == true){
                    GotKey = false;

There are a few problems. First is this line:

var GotKey : triggerkey.GetComponent(prompt_open)=boolean;

I see the intent. You’re checking if a component exists and setting a boolean accordingly, but this won’t work. You can do something like this instead:

var GotKey : boolean = false;
function Start() {
      GotKey =  triggerkey.GetComponent(prompt_open) != null;

But then, what is “triggerykey”? That object isn’t declared anywhere in the script. So you’ll need to add it.

 public var triggerkey : GameObject;

And then there is this line:

transform.GetComponent.GotKey = boolean;

But I’m not really sure what you’re trying to do. Are you trying to check the local GotKey? Or a GotKey from a different object that also has this script? Maybe it’s supposed to be triggerykey? Not sure, so just comment it out I guess.