Realistically, there should never be a point at which SetClipX shouldn't be defined, so this PR can probably be closed without merger, however, this PR:
Replaces printname with class, because it's a class not a printname.
Performs some minor cleanup and optimisations.
Fixes code to match documentation.
Localises some unlocalised variables, which were only used in a local context.
Make sure SetClipX functions are only called if they exist on the weapon (Fixes #48)
Realistically, there should never be a point at which SetClipX shouldn't be defined, so this PR can probably be closed without merger, however, this PR: