Logic that compiles ok in S7 v5.6 does not necessarily compile in TIA, you will have to change the logic in the TIA project. Without sight of your blocks it will be difficult to advise what to do. The message is trying to convey (not very well) that you must have a coil for the M flag, not a set or reset