expecting EOF, found 'else'

I can’t tell what I’m doing wrong. I checked out the other EOF questions on here and all I found was messed up {s and }s. My script only has two so I can’t see that that would be it. Here’s the script:

var flashlight : Transform;


function Update () 
{

    if (Input.GetButtonDown("flashlight"));

flashlight.enable = true;
}

    else flashlight.enable = false;

This happens because you have the ‘else’ outside of your Update function! This is one of the reasons why you should always use proper bracketing, even in one-line if statements. Avoid the confusion by putting the right number of brackets in the right places.
var flashlight : Transform;

function Update () 
{

    if (Input.GetButtonDown("flashlight"))
    {
        flashlight.enable = true;
    } else {
        flashlight.enable = false;
    }
}

Or, alternatively, you could just use this one line-

flashlight.enable = Input.GetButton("flashlight");

which I suspect will do what you want better than the above code anyway.

(Input.GetKeyDown(“f”))
torchLight.enabled = !torchLight.enabled;//Turn on/of function for Torch`