Script Reference using C #

I am facing problem in referencing Joystick.js script in CarInput.cs

public Joystick joystick;

void Start()
{
joystick= GetComponent();

}

CarInput.cs is attached to CarInput gameobject and Joystick is attached to SingleJoystick GUITexture … I tried to attach it to CarInput.cs also even though it is giving error of no reference of joystick…

Read the docs about script compilation order, specifically section 3: Unity - Scripting API: