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();
Re: 3. The code below contains a potentially fatal error, what is it? 80 80

Before you spam more questions on the board, read
http://www.daniweb.com/forums/announcement8-2.html
and
http://www.daniweb.com/forums/announcement8-3.html

How about beginning by you saying what YOU think might be wrong, then we can tell you whether your thinking is good (or not).

Re: 3. The code below contains a potentially fatal error, what is it? 80 80

Before you spam more questions on the board, read
http://www.daniweb.com/forums/announcement8-2.html
and
http://www.daniweb.com/forums/announcement8-3.html

How about beginning by you saying what YOU think might be wrong, then we can tell you whether your thinking is good (or not).

but i dont have any idea

Re: 3. The code below contains a potentially fatal error, what is it? 80 80

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();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.