PreProcessor Problems

Monkey Forums/Monkey Bug Reports/PreProcessor Problems

maverick69(Posted 2013) [#1]
            #if TARGET="ios"
                 Print "ios"
           #elseif TARGET="android"
               #if ANDROID_MARKET_AMAZON
                      Print "ANDROID_MARKET_AMAZON"
               #else
                      Print "GOOGLE PLAY"
               #end           
           #else
              Print "No iOS/android"
           #end


Output when I build for iOS:

Print "ios"
Print "No iOS/android"

(ANDROID_MARKET_AMAZON is a custom variable).


MikeHart(Posted 2013) [#2]
You can check for custom variables in the preprocessor?


maverick69(Posted 2013) [#3]
Yes, but the Bug is that the preprocessor jumps into the first #if (Print iOS) AND in the #else block at the same time.

I assume it is because of the nested #if in the #elseif-block.


marksibly(Posted 2013) [#4]
Fixed in next v67 update.