title: Does anyone know what "mscorlib: Index was out of range" means in my vbscript code?
body: <p>Here is my code:</p>
  
  <pre><code>dim myArrayList
  
  function addName
  
      Wscript.StdOut.WriteLine "What is your Quarterback's name?"
      n = Wscript.StdIn.ReadLine
  
      Wscript.StdOut.WriteLine "Attempts: "
      a = Wscript.StdIn.ReadLine
  
      Wscript.StdOut.WriteLine "Completions: "
      c = Wscript.StdIn.ReadLine
  
      Wscript.StdOut.WriteLine "Yards: "
      y = Wscript.StdIn.ReadLine
  
      Wscript.StdOut.WriteLine "Touchdowns: "
      t = Wscript.StdIn.ReadLine
  
      Wscript.StdOut.WriteLine "Interceptions: "
      i = Wscript.StdIn.ReadLine
  
  
  Set myArrayList = CreateObject( "System.Collections.ArrayList" )
      myArrayList.Add n
      myArrayList.Add a
      myArrayList.Add c
      myArrayList.Add y 
      myArrayList.Add t
      myArrayList.Add i
  
  end function 
  
  addname()
  
  function show
      for i = 1 to myArrayList.count
          Wscript.StdOut.WriteLine myArrayList(i)
      next
  end function
  
  show()
  </code></pre>
  
  <p>I receive an error that reads, 
  "mscorlib: Index was out of range. Must be non-negative and must be less of the size of the collection. Parameter name: Index"</p>
  
  <p>I don't know what the problem is
  Could anyone help me figure this out? Thanks.</p>