GLBasic forum

Main forum => GLBasic - en => Topic started by: retrotech on 2012-Mar-14

Title: preprocessor command help
Post by: retrotech on 2012-Mar-14
Code (glbasic) Select
?DEFINE compile_mode_testing TRUE

?IF compile_mode_testing = FALSE

player_lives = 3

?ELSE

player_lives = 99

?ENDIF


Please help.  My attempt at using preprocessor commands is giving me this precompiling error, "syntax error : ... true)=false".  What is the correct way to do this?
Title: Re: preprocessor command help
Post by: kanonet on 2012-Mar-14
I think it should be
Code (glbasic) Select
?DEFINE compile_mode_testing TRUE

?IF DEFINED(compile_mode_testing)

player_lives = 99

?ELSE

player_lives = 3

?ENDIF


But its not tested. Just check the helpfile.
Title: Re: preprocessor command help
Post by: MrTAToad on 2012-Mar-14
You can also use ?IFDEF