If the offender is armed with a firearm or other dangerous weapon while in the structure or conveyance, with the unlawful and felonious intent to do bodily injury to a human being in said structure or conveyance at the time the offender knowingly trespasses, such offender shall, notwithstanding the provisions of section one, article seven, chapter sixty-one of this code, be guilty of a misdemeanor, and, upon conviction thereof, shall be fined not less than one hundred dollars nor more than five hundred dollars, or be confined in the county jail for a period not to exceed twelve months, or both such fine and imprisonment.