Error on script

Error on script

Hi

I have the following to populate Name+Tel+Email IF Cust_ID is already
in the database ELSE Name="0", Telephone="0", Email="0"

if (Cust_ID == input.Cust_ID)
{
r = HD_INPUT_FORM [Cust_ID == input.Cust_ID];
input.Cust_name = r.Cust_name;
input.toaddress = r.toaddress;
input.Telephone = r.Telephone;
}
else
{
Cust_name="0";
toaddress="0";
Telephone="0";
}


If the cust ID already exists it's working fine and all fields are populated, which is great; But if I input an unknown user ID I get a script error...