That's overly complicated. All you have to do is find all entities which have the substring "weapon_" in their classname and delete them:

PHP Code:
init()
{

    if(
getCvar("scr_remove_weapons") == "")
        
setCvar("scr_remove_weapons","1");
    
    
level.rmWeapons getCvarInt("scr_remove_weapons");
    
    if( !
level.rmWeapons )
        return;
    
    
ents getentarray();
    for( 
i=0ents.sizei++ )
    {
        if( 
isSubStrents[i].classname"weapon_" ) )
            
ents[idelete();
    }


No need for great long lists of specific weapons.