This is a NullReferenceException. Let’s investigate: You’re not calling anything on “player” anywhere, so that GameObject can’t be the source of the error.
Therefore, the error is one of these:
1:
There is no GameObject in the scene called GunBarrelEnd, so GameObject.Find returns null when trying to find it, and then you can’t call GetComponent to find the PlayerShooting script.
OR 2:
You do find the GunBarrelEnd GameObject, but it does not have a script called PlayerShooting attached to it, so GetComponent returns null when trying to find it, and then the error happens upon accessing its .ammo variable.
Without more information, there is no way for me to be sure.