Problems:
Code:
csdm_equip.sma(645) : warning 225: unreachable code
csdm_equip.sma(680) : warning 225: unreachable code
csdm_equip.sma(718) : warning 225: unreachable code
csdm_equip.sma(645) : warning 225: unreachable code
Full code:
Code:
public c_Equip(id, menu, item)
{
if( item < 0 ) return PLUGIN_CONTINUE
new cmd[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, cmd,5, iName, 63, callback)
new weapon_s, weapon_p
weapon_s = get_weaponid(g_SecWeapons[id])
weapon_p = get_weaponid(g_PrimWeapons[id])
if ( ((weapon_s == 0) && g_mSecStatus) || ((weapon_p == 0) && g_mPrimStatus) || IsRestricted[weapon_s] || IsRestricted[weapon_p] )
return ITEM_DISABLED
else
return ITEM_ENABLED
return PLUGIN_HANDLED
}
Line 645:
Code:
return PLUGIN_HANDLED
csdm_equip.sma( 680 ) : warning 225: unreachable code
Full Code:
Code:
public c_Secondary(id, menu, item)
{
if( item < 0 ) return PLUGIN_CONTINUE
new cmd[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, cmd,5, iName, 63, callback)
new dis = str_to_num(cmd)
new team = get_user_team(id)
new weaptype = get_weaponid(g_Secondary[dis])
//Check to see if item is disabled
if (g_DisabledSec[dis])
{
return ITEM_DISABLED
}
else if (!IsRestricted[weaptype])
{
return ITEM_ENABLED
}
else if ((UsedWpsT[weaptype] < RestrictWps[weaptype]) && (team == _TEAM_T)
|| (UsedWpsCT[weaptype] < RestrictWps[weaptype]) && (team == _TEAM_CT))
{
return ITEM_ENABLED
}
else
{
return ITEM_DISABLED
}
return PLUGIN_HANDLED
}
Line: 680
[code]
Code:
return PLUGIN_HANDLED
csdm_equip.sma( 718 ) : warning 225: unreachable code
Full Code:
Code:
public c_Primary(id, menu, item)
{
if (item < 0)
return PLUGIN_CONTINUE
// Get item info
new cmd[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, cmd,5, iName, 63, callback)
new dis = str_to_num(cmd)
new team = get_user_team(id)
new weaptype = get_weaponid(g_Primary[dis])
//Check to see if item is disabled
if (g_DisabledPrim[dis])
{
return ITEM_DISABLED
}
else if (!IsRestricted[weaptype])
{
return ITEM_ENABLED
}
else if ((UsedWpsT[weaptype] < RestrictWps[weaptype]) && (team == _TEAM_T)
|| (UsedWpsCT[weaptype] < RestrictWps[weaptype]) && (team == _TEAM_CT))
{
return ITEM_ENABLED
}
else
{
return ITEM_DISABLED
}
return PLUGIN_HANDLED
}
Line: 718
[code]
Code:
return PLUGIN_HANDLED
Used latest version of AMXX 1.8.3
AMX Mod X Compiler 1.8.3-dev+5201