Place them in an array
array = DamTable
DamTable.at(0)=3 (weapon1 )
DamTable.at(1)=4 (weapon2 )
DamTable.at(2)=2 (weapon3 )
then you set weapon to appropriate value when equipped ( i.e. if shotgun is equipped and shotgun is weapon2 then set weapon=1
then the on bullet collison=
set damage to DamTable(weapon)
you could also keep track of weaponx names in the array via:
DamTable.at(0,1)="Assault Rifle"
DamTable.at(1,1)="Shotgun"
DamTable.at(2,1)="Knife"
This would also reflect addressing the damage as it would go from DamTable.at(0) to DamTable.at(0,0) etc
otherwise I don't believe you can use variables such as shotgun.name, shotgun.damage etc