Error message when "if" checking on BM LEG MODEL

Dear colleagues,

recently we have been trying to include the following “if-clause” in our code:

#if BM_LEG_MODEL == LEG_MODEL_TLEM1

#endif

During compiling there is always this Error message:

ERROR(SCR.SCN6) : E:/AnyBody/A…n/Setup/LabSpecificData.any(25) : ‘BM_LEG_MODEL’ : Unexpected character.
Model loading skipped

The line of code mentioned above is used in other parts of the original code
and does not produce an error message in any kind of way.

We hope that someone can give us a little advice on how to solve the problem.

Sincerely

Lukas

Dear Lukas,

This happens because the BM_LEG_MODEL is defined later than the if-clause. #define statements are pre-processor commands that effectively replace pieces of code with specified values. The order matters.
It could be that you need to define BM_LEG_MODEL explicitly before using this statement or before including the file that has this statement.

Kind regards,
Pavel

Dear Pavel,

by now I understood what you ment with your answer and I was able to reproduce/proof it.
Thanks for your fast reaction last week.

Kind regards
Lukas

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.