title: Insert two arrays in tableView - Error connecting
body: <p>Edited:</p>
  
  <p>I'm trying to insert two arrays into one tableview with two cell labels. But not really sure how I can convert it all and make it work. Here is my code so far.</p>
  
  <p>In the top of the main ViewController (Where the tableView is)</p>
  
  <pre><code>class ScoreBoardViewController: UIViewController, UITableViewDelegate, UITableViewDataSource
  
      var countedArray: [String] = []
      var nameArray: [String] = []
  
      @IBOutlet weak var tableView: UITableView!
      var list: [pointsTxt] = []
  </code></pre>
  
  <blockquote>
    <p>Additional info: I've added the <strong><em>self.tableView.delegate = self</em></strong></p>
  </blockquote>
  
  <pre><code>func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
      {
          return list.count
  
      }
  
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell
      {
          let listPath = list[indexPath.row]
          let cell = tableView.dequeueReusableCell(withIdentifier: "pointsCell") as! ScoreCell
          cell.setCell(list: listPath)
  
          return cell
      }
  
      func createArray() -&gt; [pointsTxt]
      {
          var tempTxt: [pointsTxt] = []
  
          let txt = pointsTxt(person: nameArray, points: countedArray)
  
          tempTxt.append(txt)
  
          self.list = tempTxt
          self.tableView.reloadData()
  
          return list
      }
  </code></pre>
  
  <hr>
  
  <p>Class for the cell</p>
  
  <pre><code>class ScoreCell: UITableViewCell
  {
  
      @IBOutlet weak var person: UILabel!
      @IBOutlet weak var points: UILabel!
  
  
      func setCell(list: pointsTxt)
      {
          person.text = list.person
          points.text = list.points
      }
  }
  </code></pre>
  
  <blockquote>
    <p>ERROR: Cannot assign value of type '[String]' to type 'String?'</p>
  </blockquote>
  
  <hr>
  
  <p>Class for the array</p>
  
  <pre><code>class pointsTxt
  {
      var person: [String] = []
      var points: [String] = []
  
      init(person: [String] = [], points: [String] = [])
      {
          self.person = person
          self.points = points
      }
  }
  </code></pre>
  
  <p>I hope you understand what I need. Thanks in advance!</p>