I am sorry to hear for the faced issue and will be happy to assist you with that.
Probably the issue appears when you copy coded steps between the different tests or an element is deleted from the Elements Explorer, but still used in a coded step - you can find additional details on the topic here
The thing is that an element is referenced with a recorded step in a test. Then once this step is converted into code, the element is no longer referenced by that step. And, if the element is not used by another step in the test, the reference to it may get lost, which leads to the compilation errors. Such errors can be faced in remote test execution
In case the above information is not sufficient for you to sort what causes the errors, I will be glad to explore a project, which generates such an error and provide further details on the case. So, please, do not hesitate to contact me back in case of need.
Thank you in advance for your cooperation.