Figure 7:  Checking whether the weapon code is correct