Hi i need help with error. Plugin can normal compile but dont work Item on this function.
Please help
Here are errors:
L 04/17/2013 - 19:41
4: [AMXX] Run time error 4: index out of bounds
L 04/17/2013 - 19:41
4: [AMXX] [0] KnifeShoppp.sma::takeDamage_pre (line 219)
Code:
PHP Code:
new bool:g_bActived_SuperKnife[33];
PHP Code:
RegisterHam(Ham_TakeDamage, "player","takeDamage_pre")
PHP Code:
public takeDamage_pre(victimID, inflictor, attackerID, Float:flDmg, dmgBits)
{
if(g_bActived_SuperKnife[attackerID]) // -------- Here is error --------
{
new iTemp, iWepId;
iWepId = get_user_weapon(attackerID, iTemp, iTemp);
if(cs_get_user_team(attackerID) == CS_TEAM_T && iWepId == CSW_KNIFE)
{
SetHamParamFloat(4, flDmg * get_pcvar_float(cvar_dmg))
}
}
return HAM_IGNORED
}
__________________