[quote]#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "talkmonster.h"
#include "schedule.h"
#include "defaultai.h"
#include "scripted.h"
#include "animation.h"
#include "soundent.h"
class CLab : public CBaseMonster
{
public:
[blue]void[/blue] Spawn( [blue]void[/blue] );
[blue]int[/blue] Classify ( [blue]void[/blue] );
void CLab :: spawn( void ){
Precache( );
SET_MODEL(ENT(pev), "models/scientist.mdl");
UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX);
pev->solid = SOLID_SLIDEBOX;
pev->movetype = MOVETYPE_STEP;
m_bloodColor = BLOOD_COLOR_RED;
pev->health = gSkillData.scientistHealth;
pev->view_ofs = Vector ( 0, 0, 50 );[green]// position of the eyes relative to monster's origin.[/green]
m_flFieldOfView = VIEW_FIELD_WIDE; [green]// NOTE: we need a wide field of view so scientists will notice player and say hello[/green]
m_MonsterState = MONSTERSTATE_NONE;
pev->skin = 0;
MonsterInit();
}void CLab :: Precache( void )
{
PRECACHE_MODEL("models/scientist.mdl");
}[/quote]The error:
-------------------Configuration: hl - Win32 Profile-------------------Now, it's pretty obvious i didn't have the correct brackets here: [quote]{
Compiling...
blaster.cpp
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(39) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
blaster.obj - 1 error(s), 0 warning(s)
public:
void Spawn( void );
int Classify ( void );
void CLab :: spawn( void )[/quote]But it i add the closing bracket there, this will happen.
[quote]-------------------Configuration: hl - Win32 Profile-------------------
Compiling...
blaster.cpp
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(19) : error C2628: 'CLab' followed by 'void' is illegal (did you forget a ';'?)
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(19) : error C2039: 'spawn' : is not a member of 'CLab'
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(13) : see declaration of 'CLab'
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(21) : error C2065: 'Precache' : undeclared identifierC:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(22) : error C2065: 'pev' : undeclared identifier
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(24) : error C2227: left of '->solid' must point to class/struct/union
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(25) : error C2227: left of '->movetype' must point to class/struct/union
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(26) : error C2065: 'm_bloodColor' : undeclared identifier
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(27) : error C2227: left of '->health' must point to class/struct/union
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(28) : error C2227: left of '->view_ofs' must point to class/struct/union
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(29) : error C2065: 'm_flFieldOfView' : undeclared identifier
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(30) : error C2065: 'm_MonsterState' : undeclared identifier
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(31) : error C2227: left of '->skin' must point to class/struct/union
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(32) : error C2065: 'MonsterInit' : undeclared identifier
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(36) : error C2509: 'Precache' : member function not declared in 'CLab'
C:\Sierra\Half-Life\SDK\Single-Player Source\dlls\blaster.cpp(13) : see declaration of 'CLab'
Error executing cl.exe.blaster.obj - 14 error(s), 0 warning(s)[/quote]