Error?? on variable

UnassignedReferenceException: The variable targetA of ‘TankModel_B1’ has not been assigned.
You probably need to assign the targetA variable of the TankModel_B1 script in the inspector.
TankModel_B1.Update () (at Assets/TankModel_B1.js:17)

whats wrong with this code ??? can run and work but got red line which show on above:
which i have put a Strong to it on the code below

var targetA : Transform;

var targetB : Transform;

private var currentTarget : Transform;

var proximity : float = 1.0;

var speed : float = 1.0;

//with function Start we set at start the current target

function Start ()

{

currentTarget = targetA;

}

function Update ()

{

var Distance : Vector3 = currentTarget.transform.position - transform.position;

//if “player” is “1” unit far, change currentTarget to next one

if(Distance.magnitude < proximity)

{

  switch(currentTarget)

  {

     case targetA:

        currentTarget = targetB;

     break;

     case targetB:

        currentTarget = targetA;

     break;

  }

}

transform.position = Vector3.Slerp(transform.position, currentTarget.transform.position, Time.deltaTime * speed);

//make object look towards currentTarget

transform.LookAt(currentTarget);

}

You probably need to assign the targetA variable of the TankModel_B1 script in the inspector.

The problem is that your code doesn’t actually know that Update never gets called before Start. Just put in the line

if(currentTarget == null)
{
    return;
}

before everything else in Update, and then it will never reach the next part if currentTarget has not been assigned yet.