Java script errors

I have this code and i have no idea why I’m getting errors

#pragma strict

private var guiShow : boolean = false;
private var purchased : boolean = false;

var rayLength = 10;

function Update ()
{    
    var hit : RaycastHit;
    var fwd = transform.TransformDirection(Vector3.forward);
    
    if (Physics.Raycast(transform.position, fwd, hit, rayLength))
    {
        if (hit.collider.gameObject.tag == "pitVendor")
        {
            Debug.Log("In range");
            guiShow = true;
            
            if(Input.GetKeyDown("e") && purchased == false);
            {
                GameObject.Find("").GetComponent(pitPurchaseGUI).pitPurchase();      
            }
     
            else 
            {
                //poop
            }               
            
        }
        else
        {
            guiShow = false;
        }   
     }
}   
 
function OnGUI ()
{
    if (guiShow == true && purchased == false)
    {
        GUI.Box(Rect(Screen.width / 2, Screen.height / 2, 200, 25), "Press 'E' to Purchase (50 Kills)");       
    }
}  

function pitPurchaseSuccess ()
{
    purchased = true;
    Debug.Log("Purchase success");
    GameObject.Find("pitBoundary").GetComponent(thePitPurchase).pitGone()
    purchased = true;
    totalScore -= 50;
}

these are the errors im getting:
Assets/My Scripts/pitPurchaseGUI.js(25,13): BCE0044: expecting }, found ‘else’.

Assets/My Scripts/pitPurchaseGUI.js(36,1): BCE0044: expecting EOF, found ‘}’.

its a parsing error, if you open a { you must close it with a corresponding } this question has been asked a lot over the past few days, it really is simple coding, it may be worth getting a book or following some online tutorials about how coding works.

all the best :slight_smile:

oh, and put a } before the second else