Raised This Month: $51 Target: $400
 12% 

compiling errors :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 04-16-2009 , 19:59   compiling errors :(
Reply With Quote #1

it's been a while well can some1 help me with these errors please?

Code:
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(63) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(63) : error 017: undefined symbol "weapon"
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(65) : error 017: undefined symbol "knifekills"
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(70) : warning 225: unreachable code
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(70) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(70) : error 017: undefined symbol "weapon"
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(72) : error 017: undefined symbol "knifekills"
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(75) : warning 225: unreachable code
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(81) : warning 204: symbol is assigned a value that is never used: "knifekill"
/home/groups/amxmodx/tmp3/phpsSxW3O.sma(81) : warning 204: symbol is assigned a value that is never used: "nadekill"
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Special Kills MOD"
#define VERSION "1.0"
#define AUTHOR "PvtSmithFSSF"
#define isPlayer(%1) (1<=(%1)<=32)
new knifekill, nadekill, pluginon

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    knifekill = register_cvar("amx_knifekill", "3")
    nadekill = register_cvar("amx_nadekill", "2")
    pluginon = register_cvar("amx_skmod", "1")
    
    RegisterHam(Ham_Killed,"player","death");
}

public client_putinserver(id)
{
    set_task(4.0, "OnOffNotify", id)
    set_task(2.0, "SKMDetailsNotify", id)
}


public OnOffNotify(id)
{
    if(!get_pcvar_num(pluginon))
    {
        client_print(id, print_chat, "[AMXModX] 'Special Kills Mod' is currently DISABLED.");
        return PLUGIN_HANDLED;
    }
    else
    {
        client_print(id, print_chat, "[AMXModX] 'Special Kills Mod' is currently ENABLED.");
        return PLUGIN_HANDLED;
    }
    return PLUGIN_HANDLED;
    
}

public SKMDetailsNotify(id)
{
    if(get_pcvar_num(pluginon))
    {
        client_print(id, print_chat, "[AMXModX] Try to get knife/grenade kills! They will give you a special +Kill Bonus!");
        return PLUGIN_HANDLED;
    }
    return PLUGIN_HANDLED;
}

public death(id, id_attacker, shouldgib)
{
    
    if(isPlayer(id_attacker) && get_pcvar_num(pluginon)) && (weapon == CSW_KNIFE) 
    {
        set_user_frags(id_attacker,get_user_frags(id_attacker) + get_pcvar_num(knifekills));
        return HAM_SUPERCEDE;
    }
    
    
        if(isPlayer(id_attacker) && get_pcvar_num(pluginon)) && (weapon == weapon_hegrenade)
    {
        set_user_frags(id_attacker,get_user_frags(id_attacker) + get_pcvar_num(knifekills));
        return HAM_SUPERCEDE;
    }
    return HAM_IGNORED;
    
}

Last edited by PvtSmithFSSF; 04-16-2009 at 20:22.
PvtSmithFSSF is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 04-16-2009 , 20:29   Re: compiling errors :(
Reply With Quote #2

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Special Kills MOD"
#define VERSION "1.0"
#define AUTHOR "PvtSmithFSSF"
#define isPlayer(%1) (1<=(%1)<=32)

new knifekillnadekillpluginon

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
knifekill register_cvar("amx_knifekill""3")
    
nadekill register_cvar("amx_nadekill""2")
    
pluginon register_cvar("amx_skmod""1")
    
    
RegisterHam(Ham_Killed,"player","death");
}

public 
client_putinserver(id)
{
    
set_task(4.0"OnOffNotify"id)
    
set_task(2.0"SKMDetailsNotify"id)
}


public 
OnOffNotify(id)
{
    if(!
get_pcvar_num(pluginon))
    {
        
client_print(idprint_chat"[AMXModX] 'Special Kills Mod' is currently DISABLED.");
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
client_print(idprint_chat"[AMXModX] 'Special Kills Mod' is currently ENABLED.");
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;
    
}

public 
SKMDetailsNotify(id)
{
    if(
get_pcvar_num(pluginon))
    {
        
client_print(idprint_chat"[AMXModX] Try to get knife/grenade kills! They will give you a special +Kill Bonus!");
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;
}

public 
death(idid_attackershouldgib){
    
    new 
weapon get_user_weapon(id_attacker)
    
    if(
isPlayer(id_attacker) && get_pcvar_num(pluginon) && (weapon == CSW_KNIFE)){
        
set_user_frags(id_attacker,get_user_frags(id_attacker) + get_pcvar_num(knifekill));
        return 
HAM_SUPERCEDE;
    }
    
    
    if(
isPlayer(id_attacker) && get_pcvar_num(pluginon) && (weapon == CSW_HEGRENADE)){
        
set_user_frags(id_attacker,get_user_frags(id_attacker) + get_pcvar_num(nadekill));
        return 
HAM_SUPERCEDE;
    }
    return 
HAM_IGNORED;
    

compile without errors on my pc
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 04-16-2009 , 20:42   Re: compiling errors :(
Reply With Quote #3

Thanks so much man! +k
PvtSmithFSSF is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 04-17-2009 , 06:25   Re: compiling errors :(
Reply With Quote #4

Instead of 32 use g_maxplayers for instance and asign it to "get_maxplayers()"
__________________

anakin_cstrike is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode