Help about if statement in constraint block

Hi guys, I forgot some part of my codes so please check my code again. I just added the cmd and the solve cmd before data constraint.