title: 'end' expected (to close 'while' at line 3) near '<eof>'
body: <p>i'm completely new to Lua and i have got this error multiple times "'end' expected (to close 'while' at line 3) near ''" i have checked to find answers online and no luck so i was hoping someone could help me fix this problem, thanks alot </p>
  
  <p>Here is my code : </p>
  
  <pre><code>print ("Welcome to the maze")
  
  while input ~= "leave" do
  
      print ("What do you want to do first? Leave or inspect?")
  
  
      input = io.read()
  
      if input == "inspect" then
          print (" You venture towards the maze.")
      end
  
      if input == "leave" then
          print ("You turn around and run.")
      end
  </code></pre>