Raised This Month: $ Target: $400
 0% 

Need help on error fixing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
freamer
Member
Join Date: Nov 2005
Old 06-20-2007 , 15:39   Re: Need help on error fixing
Reply With Quote #1

Changed event register to this:
register_event("Damage", "doDamage", "b", "2!0", "3=0", "4!0")
and modified function code to this:
Code:
public doDamage(id){
    if (get_cvar_num("sv_xweapons")==0){
        return PLUGIN_CONTINUE
    }
    switch ( id )
    {
	case 0:
	return PLUGIN_CONTINUE
    }

    new plrDmg = read_data(2)
    new plrWeap
    new plrPartHit
    new plrAttacker = get_user_attacker(id, plrWeap, plrPartHit)
    switch ( plrAttacker )
    {
        case 0:
	return PLUGIN_CONTINUE
    }
    if(!is_user_connected(id) || !is_user_connected(plrAttacker)) return PLUGIN_CONTINUE;
    if (!xmp5_carrier[plrAttacker] && !xm3_carrier[plrAttacker] && !xarmor_carrier[plrAttacker] && !xkevlar_carrier[plrAttacker] && !xknife_carrier[plrAttacker] && !xrevolver_carrier[plrAttacker]){
        return PLUGIN_CONTINUE
    }
    if (!is_user_alive(id)){
        return PLUGIN_CONTINUE
    }
    new plrHealth = get_user_health(id)
    new plrNewDmg
... but it is still writing the same error at the same line
however i noticed a compilation warning:
/home/groups/amxmodx/tmp3/phpI8CxOi.sma(414) : warning 217: loose indentation
what does it mean?
thank you for any help
freamer is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 06-20-2007 , 15:45   Re: Need help on error fixing
Reply With Quote #2

Quote:
Originally Posted by freamer View Post
Changed event register to this:
register_event("Damage", "doDamage", "b", "2!0", "3=0", "4!0")
and modified function code to this:
Code:
public doDamage(id){
    if (get_cvar_num("sv_xweapons")==0){
        return PLUGIN_CONTINUE
    }
    switch ( id )
    {
	case 0:
	return PLUGIN_CONTINUE
    }

    new plrDmg = read_data(2)
    new plrWeap
    new plrPartHit
    new plrAttacker = get_user_attacker(id, plrWeap, plrPartHit)
    switch ( plrAttacker )
    {
        case 0:
	return PLUGIN_CONTINUE
    }
    if(!is_user_connected(id) || !is_user_connected(plrAttacker)) return PLUGIN_CONTINUE;
    if (!xmp5_carrier[plrAttacker] && !xm3_carrier[plrAttacker] && !xarmor_carrier[plrAttacker] && !xkevlar_carrier[plrAttacker] && !xknife_carrier[plrAttacker] && !xrevolver_carrier[plrAttacker]){
        return PLUGIN_CONTINUE
    }
    if (!is_user_alive(id)){
        return PLUGIN_CONTINUE
    }
    new plrHealth = get_user_health(id)
    new plrNewDmg
... but it is still writing the same error at the same line
however i noticed a compilation warning:
/home/groups/amxmodx/tmp3/phpI8CxOi.sma(414) : warning 217: loose indentation
what does it mean?
thank you for any help
loose indentation means that the line is not in the same height as the others

An example on loose indentation:
Code:
public plugin_init()
{
	register_plugin(Plugin, Version, Author)
	register_concmd("amx_editor", "cmd_editor", ADMIN_CFG, "- Opens the editor")
	
    new Host[64], User[64], Pass[64], Db[64] // loose indentation

    	get_cvar_string("amx_sql_host", Host, 63)

Last edited by Deviance; 06-20-2007 at 15:48.
Deviance 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 21:29.


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