In if condition previously it was wrongly checking using assign sign, it...

In if condition previously it was wrongly checking using assign sign, it should be ==