Ok I got this working I needed to include
sdk_gamerules.h in the CLIENT_DLL section would not work otherwise.
#ifdef CLIENT_DLL
#else
#include "voice_gamemgr.h"
#include "team.h"
#include "sdk_player.h" // added.
#endif
r00t 3:16
CQC Gaming
www.cqc-gaming.com
----- Original Message -----
From: "Hasan Aljudy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 10, 2004 11:16 PM
Subject: Re: [hlcoders] use of undefined type CSDKPlayer
> just type:
>
> class CSDKPlayer;
>
> without anything .. it's a forward declaration, basically lets the
> code knows that this class exists.
> afaik, you can only declare _pointers_ to this class after the forward
> declaration, otherwise you will have to #include the header file
> containing the definition of the class.
>
>
> On Fri, 10 Dec 2004 22:47:52 -0500, r00t 3:16 <[EMAIL PROTECTED]>
wrote:
> > I can not get this to work for the life of me.
> > (Classes confuse the hell out of me)
> >
> > Anyways if I comment out
> > if ( pPlayer->clientCommand( pcmd ) )
> > return true;
> > It will compile without errors
> >
> > If I have the follow code (shown below)
> > I get use of undefined type CSDKPlayer
> >
> > bool CSDKGameRules::ClientCommand( const char *pcmd, CBaseEntity
*pEdict )
> > {
> > // get a pointer to the player
> >
> > CSDKPlayer *pPlayer = (CSDKPlayer *) pEdict;
> >
> > if ( pPlayer->ClientCommand( pcmd ) )
> >
> > return true;
> >
> > // Try a client command on the gamerules
> >
> > if( BaseClass::ClientCommand( pcmd, pEdict ) )
> > return true;
> >
> > }
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders