switch(weapon) instead of switch(w) maybe? Seriosly, i cant believe you could't fix it yourself, you proably didn't even tried, i mean come on...