Using a slider script to control an object's rotation?

Hello, I'm a newbie at programming, but I'd like to ask for help on the script that I am working on.

I want to have a slider that controls the rotation of a directional light, X axis to be exact. This is to simulate a sunset.

When the slider reaches 10, the x rotation of the light should be -33 from its current rotation -- 20. (The final value should be -13)

This is what I tried:

var Sunlight : Light;

var hSliderValue : float = 0.0;

function OnGUI()

{
    hSliderValue = GUI.HorizontalSlider(Rect(25,25,100,30), hSliderValue, 0.0, 10.0);

if (hSliderValue = 10)
{
    Sunlight.transform.eulerAngles(Vector3);
}

}

When this script is in my project assets, I can't enter playmode. Can someone please help me find out what's wrong with this script, and how do I achieve the result I expressed above? =)

Sunlight.transform.rotation.eulerAngles.x = hSliderValue;