title: The name '' does not exist in the current context - Unity 3D
body: <p>i get the errors The name 'AK74' does not exist in the current context and The name 'STG44' does not exist in the current context in both Debug.Log lines</p>
  <p>any solution?</p>
  <pre><code>     private void Start()
      {
          weapon = GetComponent&lt;Weapon&gt;();
  
          Weapon AK74 = new Weapon(2, 30, 200);
          Weapon STG44 = new Weapon(1, 35, 200);
  
          _currentAmmoInClip = clipSize;
          STG44.Setmagsize(_currentAmmoInClip);
  
          _ammoInReserve = reservedAmmoCapacity;
          STG44.Setfullmag(_ammoInReserve);
          _canShoot = true;
  
  
      }
  
      private void Update()
      {
          Debug.Log(AK74.Getmagsize());
          Debug.Log(STG44.Getmagsize());
      }
  </code></pre>