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();
emin3m 0 Newbie Poster
Recommended Answers
Jump to Postwhen 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:
…
All 3 Replies
Salem 5,265 Posting Sage
emin3m 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.