Working in Editor but not in Execucatable build

Dear all,

I ma bit new to this unity, and i am facing some problem in my script, so could you please help me out??? Actually everything i sworking fine in unity editor but not working in .EXE.I have 4 object, when the mouse points to that target that object has to highlite using raycast and it should reset it bak to the original colours when the mouse does not hit the object. Kindly help

functin update()
{
    if (Physics.Raycast (ray, hit, 10000)) 
    {
        if( hit.collider.gameObject.transform.parent.name.StartsWith( "Target" ) )
        {
            ObjectName = hit.collider.gameObject.transform.parent.name;
            resetColor(ObjectName);    
            LaneNo = int.Parse( ObjectName.Substring( ObjectName.Length - 1 ) );
            if( hit.collider.name == "Inner" )  
            {
                switch(LaneNo)
                {
                    case1 :
                    hit.collider.gameObject.renderer.material.color = Color.red;
                    .
                     .
                    .
                    case n:
                    hit.collider.gameObject.renderer.material.color = Color.red;
                }
            }
        }
        else
        {
            resetcolor(Objname);
        }
    }
    else
    {
        resetcolor(Objname);
    }
}


function resetcolor(Objname)
{
    GameObject.Find(ObjName).transform.GetChild(0).renderer.material.color=initialmaterial;   
    GameObject.Find(ObjName).transform.GetChild(2).renderer.material.color = initialmaterial2;
    GameObject.Find(ObjName).transform.GetChild(3).renderer.material.color = initialmaterial1;
}

your update function should probably be named function Update() instead of functin update()