title: Type has no subscript members, for word scrambler app
body: <p>I am making a word scrambler app, and I have some issues in the code.</p>
  
  <p>I have an array of instances of a struct, and I am randomly choosing 5 out of the array and appending them to an array named: <code>chosen5</code>.</p>
  
  <p>I made a function to show the contents of the first word in the array <code>chosen5</code>, but I have an error saying:</p>
  
  <blockquote>
    <p>Type 'ViewController.word' has no subscript members</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/sp0b0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sp0b0.png" alt="enter image description here"></a></p>
  
  <p>How can I prevent this error from occurring?</p>