Hello there i got this error while taking Change team code from nikhilgupta345 plugin
Quote:
Error: Invalid expression, assumed zero on line 52
Error: Undefined symbol "Ham_PlayerKilled_Post" on line 52
Error: Undefined symbol "iKiller" on line 52
Error: Too many error messages on one line on line 52
Compilation aborted.
4 Errors.
|
PHP Code:
/* Plugin generated by AMXX-Studio */
#include < amxmodx >
#include < cstrike >
#include < hamsandwich >
#include < fun >
#include < fakemeta >
#include < engine >
#include < xs >
#define PLUGIN "test"
#define VERSION "1.0"
#define AUTHOR "nikhilgupta345"
new const g_szPrefix[ ] = "[Nightcrawler]";
/* Booleans */
new bool:g_bNCNextRound[ 33 ];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Killed, "player", "Ham_PlayerKilled_Post", 1 );
}
public client_putinserver( id )
{
g_bNCNextRound[ id ] = false;
}
public Ham_PlayerKilled_Post(iVictim, iKiller, iShouldGib)
{
if( !is_user_alive( iKiller ) )
return HAM_IGNORED;
switch( cs_get_user_team( iKiller ) )
{
case CS_TEAM_CT:
{
if( cs_get_user_team( iVictim ) == CS_TEAM_T )
{
client_print( iVictim, print_chat, "%s You were killed by a human and are now one also!", g_szPrefix );
cs_set_user_team( iVictim, CS_TEAM_CT );
if( !g_bNCNextRound[ iKiller ] )
{
client_print( iKiller, print_chat, "%s You killed a Night-Crawler and will be one next round!", g_szPrefix );
g_bNCNextRound[ iKiller ] = true;
}
}
}
case CS_TEAM_T:
{
if( cs_get_user_team( iVictim ) == CS_TEAM_CT )
{
client_print( iKiller, print_chat, "%s You killed a human!", g_szPrefix );
client_print( iVictim, print_chat, "%s You were killed by a Night-Crawler!", g_szPrefix );
}
}
}
Can anybody help ?