Quote:
Originally Posted by freamer
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)