0
extern CGameEngine *g_psEngine; // assume g_psEngine is always valid.

#if !defined(BUILD_RELEASE) 
#define Debug(A) g_psEngine->DebugPrint(A);
#else 
#define Debug(A)
#endif 

if(!a)Debug(“Player Not Found”) 

ControlPlayer();
3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Ancient Dragon
0

when BUILD_RELEASE is defined the Debug macro is not evaluated and the function on line 11 of the code you posted will only be executed if a == 0, in otherwords line 11 becomes part of the if condition on line 9, just as if it were written like this:

if(!a)
    ControlPlayer();
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.