• Troubleshooting Valve's old Houndeye code?
    1 replies, posted
[B]houndeye.cpp:[/B] [CODE]void CNPC_Houndeye::DeathSound ( ) { EmitSound( "NPC_Houndeye.Die" ); } //========================================================= // PainSound //========================================================= void CNPC_Houndeye::PainSound ( ) { EmitSound( "NPC_Houndeye.Pain" ); } [/CODE] [B]houndeye.h[/B] [CODE]class CNPC_Houndeye : public CAI_BaseNPC { DECLARE_CLASS( CNPC_Houndeye, CAI_BaseNPC ); public: void Spawn( void ); void Precache( void ); Class_T Classify ( void ); void HandleAnimEvent( animevent_t *pEvent ); float MaxYawSpeed ( void ); void WarmUpSound ( void ); void AlertSound( void ); void DeathSound( const CTakeDamageInfo &info ); void WarnSound( void ); void PainSound( const CTakeDamageInfo &info );[/CODE] As the title says, if you look through the files of the Half-Life 2 source code, you can find the code they were going to use for Houndeyes. When you use it, it returns a lot of errors because it was made for an older version of the HL2 build. I managed to patch up some of them, but one thing that has me really confused it that in [B]houndeye.cpp[/B], it gives me these errors for the lines I pasted here: [B]1>houndeye.cpp(525): error C2511: 'void CNPC_Houndeye::DeathSound(void)' : overloaded member function not found in 'CNPC_Houndeye' 1> C:\modcode\src\game\server\hl2\npc_houndeye.h(23) : see declaration of 'CNPC_Houndeye' 1>houndeye.cpp(533): error C2511: 'void CNPC_Houndeye::PainSound(void)' : overloaded member function not found in 'CNPC_Houndeye' 1> C:\modcode\src\game\server\hl2\npc_houndeye.h(23) : see declaration of 'CNPC_Houndeye'[/B] However, the function is clearly defined in houndeye.h. Could somone help me find out what's wrong?
void CNPC_Houndeye::DeathSound( const CTakeDamageInfo &info ); -vs- void CNPC_Houndeye::DeathSound (); :v:
Sorry, you need to Log In to post a reply to this thread.