title: Reading a text file and assigning its content to different variables in vb 6
body: <p>I am currently trying to make a RPG game. I have how the save game function works, but I cannot figure out how to make the load function work.  I am trying to assign a text files content to different variables but when I look up how, I always find people are setting the content of the text files to a single variables when I am trying to assign it to 6 different variables.  Is there a way for me to do this, or do I have to store each of them into different text files?</p>
  
  <pre><code>nFileNum = FreeFile
  
  ' Open a text file for input. inputbox returns the path to read the file
  Open "C:\DaggerFall\CharacterInformation.txt" For Input As nFileNum
  
  lLineCount = 1
  
  ' Read the contents of the file
  Do While Not EOF(nFileNum)
      Line Input #nFileNum, sNextLine
      sNextLine = sNextLine &amp; vbCrLf
      sText = sText &amp; sNextLine
  Loop
  
  Text1.Text = sText
  
  ' Close the file
  Close nFileNum
  </code></pre>