Can we see that script?
Best guess is that you have a calculation expression with an = sign where such should not be there.
a classic example of that is when a new developer tries to use:
If ( A = B; Table::field = "Yes" ; Table::Field = "No" )
If ( A = B ; "Yes" ; "No" )
Set field [ Table::Field = "Yes" ]
would be another example of the same mistake.
Thanks much. Your guess was correct. Didn't do Set field right. Now it works.