Error message when "if" checking on BM LEG MODEL

#1

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

#2

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

#3

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