Veteran Member
|
03-23-2013
, 04:37
Compile Error
|
#1
|
Hi guys, i have an error when i try to compile my source, here the full code
Code:
//#include "CString.h"
#include "zombie_hunting.h"
int DispatchSpawn( edict_t * ) {
edict_t * pFog;
pFog = g_engfuncs.pfnCreateNamedEntity( g_engfuncs.pfnAllocString( "env_fog" ) );
if( !FNullEnt( pFog ) ) {
KeyValueData KVD;
KVD.szClassName = "env_fog";
KVD.szKeyName = "density";
KVD.szValue = "0.0018";
KVD.fHandled = 0;
MDLL_KeyValue( pFog, & KVD );
KVD.szClassName = "env_fog";
KVD.szKeyName = "rendercolor";
KVD.szValue = "125 0 0";
KVD.fHandled = 0;
MDLL_KeyValue( pFog, & KVD );
}
RETURN_META_VALUE( MRES_IGNORED, 0 );
}
void ServerActivated_Post( edict_t *, int, int ) {
CVAR_SET_STRING( "sv_skyname", "space" );
RETURN_META( MRES_IGNORED );
}
static cell AMX_NATIVE_CALL get_zombie( AMX * pAmx, cell * pParamaters ) {
CHECK_PLAYER( pParamaters[ 1 ] );
return g_iPlayers[ pParamaters[ 1 ] ].bZombie;
};
static cell AMX_NATIVE_CALL set_zombie( AMX * pAmx, cell * pParamaters ) {
CHECK_PLAYER( pParamaters[ 1 ] );
g_iPlayers[ pParamaters[ 1 ] ].bZombie = pParamaters[ 2 ] ? true : false;
return 1;
};
static cell AMX_NATIVE_CALL get_nemesis( AMX * pAmx, cell * pParamaters ) {
return g_iPlayers[ pParamaters[ 1 ] ].bNemesis;
};
static cell AMX_NATIVE_CALL set_nemesis( AMX * pAmx, cell * pParamaters ) {
CHECK_PLAYER( pParamaters[ 1 ] );
g_iPlayers[ pParamaters[ 1 ] ].bNemesis = pParamaters[ 2 ] ? true : false;
return 1;
};
static cell AMX_NATIVE_CALL get_survivor( AMX * pAmx, cell * pParamaters ) {
CHECK_PLAYER( pParamaters[ 1 ] );
return g_iPlayers[ pParamaters[ 1 ] ].bSurvivor;
};
static cell AMX_NATIVE_CALL set_survivor( AMX * pAmx, cell * pParamaters ) {
CHECK_PLAYER( pParamaters[ 1 ] );
g_iPlayers[ pParamaters[ 1 ] ].bSurvivor ? true : false;
return 1;
};
AMX_NATIVE_INFO g_szNatives[ ] = {
{ "get_zombie", get_zombie },
{ "set_zombie", set_zombie },
{ "get_nemesis", get_nemesis },
{ "set_nemesis", set_nemesis },
{ "get_survivor", get_survivor },
{ "set_survivor", set_survivor },
{ NULL, NULL }
};
void OnAmxxAttach( ) {
MF_AddNatives(g_szNatives);
}
void OnPluginsLoaded( ) {
g_iForwards.iClientInfected = MF_RegisterForward( "client_infected", ET_IGNORE, FP_CELL, FP_CELL, FP_DONE );
g_iForwards.iClientInfected_Post = MF_RegisterForward( "client_infected_post", ET_IGNORE, FP_CELL, FP_CELL, FP_DONE );
g_iForwards.iClientCured = MF_RegisterForward( "client_cured", ET_IGNORE, FP_CELL, FP_CELL, FP_DONE );
g_iForwards.iClientCured_Post = MF_RegisterForward( "client_cured_post", ET_IGNORE, FP_CELL, FP_CELL, FP_DONE );
}
int InfectClient( int iVictim, int iAttacker ) {
MF_ExecuteForward( g_iForwards.iClientInfected, iVictim, iAttacker );
if( g_iPlayers[ iAttacker ].bNemesis ) {
g_iPlayers[ iAttacker ].pEdict -> v.health = 200000.0;
g_iPlayers[ iAttacker ].pEdict -> v.speed = 250.0;
g_iPlayers[ iAttacker ].pEdict -> v.gravity = 0.5;
} else {
}
MF_ExecuteForward( g_iForwards.iClientInfected_Post, iVictim, iAttacker );
return 1;
}
int CureClient( int iVictim, int iAttacker ) {
MF_ExecuteForward( g_iForwards.iClientCured, iVictim, iAttacker );
if( g_iPlayers[ iAttacker ].bSurvivor ) {
g_iPlayers[ iAttacker ].pEdict -> v.health = 2500.0;
g_iPlayers[ iAttacker ].pEdict -> v.speed = 250.0;
g_iPlayers[ iAttacker ].pEdict -> v.gravity = 1.0;
} else {
}
MF_ExecuteForward( g_iForwards.iClientCured_Post, iVictim, iAttacker );
return 1;
}
void UTIL_ClientColoredPrint( int iPlayer, const char * pszMessage ) {
if (iPlayer)
MESSAGE_BEGIN( MSG_ONE, GET_USER_MSG_ID( PLID, "SayText", NULL ), NULL, g_iPlayers[ iPlayer ].pEdict );
else
MESSAGE_BEGIN( MSG_BROADCAST, GET_USER_MSG_ID( PLID, "SayText", NULL) );
WRITE_BYTE( gpGlobals -> maxClients + 1 );
WRITE_STRING( pszMessage );
MESSAGE_END( );
}
and the compiler say:
Code:
1>------ Build started: Project: zombie_hunting, Configuration: Release Win32 ------
1> zombie_hunting.cpp
1>C:\Developement\HLSDK\multiplayer\engine\eiface.h(416): warning C4005: 'ARRAYSIZE' : macro redefinition
1> C:\Program Files\Windows Kits\8.0\Include\um\winnt.h(1182) : see previous definition of 'ARRAYSIZE'
1> Creating library .\Release/zombie_hunting.lib and object .\Release/zombie_hunting.exp
1>amxxmodule.obj : error LNK2001: unresolved external symbol "void __cdecl ServerActivate_Post(struct edict_s *,int,int)" (?ServerActivate_Post@@YAXPAUedict_s@@HH@Z)
1>C:\Users\ADMIN\Desktop\Zombie Hunting\msvc10\Release\zombie_hunting_amxx.dll : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Thank's in advance :p
Last edited by TheDS1337; 03-23-2013 at 04:39.
|
|