title: VBScript for rock, paper, scissors outcome
body: <p>Let me first start by saying thank you in advance for any help.</p>
  
  <p>I am working a script for school using VBScript. I have never used this particular script in the past but it does not seem too terrible to use. The assignment I am working on is to add an outcome display to the results of the game. Below is what I have so far. If I use all "IF" statements the script will run but it will display all of the game outcomes. Changing the "IF" statement to and "ELSEIF" statement returns a syntax error beginning with the "THEN" statement in the second line of the outcome script. Can someone point me in the right direction as to what I have missed or what I have done incorrectly. Thanks again for the time and consideration.</p>
  
  <pre><code>'Formally declare variables used by the script before trying to use them
  Dim WshShl, Answer, CardImage
  
  'Create an instance of the WScript object in order to later use the
  'Popup method
  Set WshShl = WScript.CreateObject("WScript.Shell")
  
  'Input for player name
  Reply1 = InputBox("Hello. What is your name?")
  'Display greeting and player name
  MsgBox "Hello " &amp; Reply1 &amp; "! Welcome to Rock, Paper Scissors!"
  
  'Display the rules of the game
  WshShl.Popup "Welcome to Rock, Paper and Scissors game. Here are the " &amp; _
    "rules of the game: 1. Guess the same thing as the computer " &amp; _
    "to tie. 2. Paper covers rock and wins. 3. Rock breaks " &amp; _
    "scissors and wins. 4. Scissors cut paper and wins."
  
  'Prompt the user to select a choice
  Answer = InputBox("Type Paper, Rock, or Scissors.", _
    "Let's play a game!")
  
  'Time for the computer to randomly pick a choice
   Randomize
  GetRandomNumber = Round(FormatNumber(Int((3 * Rnd()) + 1)))
  
  'Assign a value to the randomly selected number
  If GetRandomNumber = 3 then CardImage = "rock"
  If GetRandomNumber = 2 then CardImage = "scissor"
  If GetRandomNumber = 1 then CardImage = "paper"
  
  'Display the game's results so that the user can see if he or she won
  WshShl.Popup "You picked: " &amp; Answer &amp; Space(12) &amp; "Computer picked: " &amp; _
    CardImage
  
  If Answer = "Rock" &amp; Computer &lt;&gt; "Paper" Then MsgBox "Paper Covers Rock: Computer Wins"
  ElseIfAnswer = "Paper" &amp; Computer &lt;&gt; "Scissors" Then MsgBox "Scissors Cuts Paper: Computer Wins"
  ElseIfAnswer = "Scissors" &amp; Computer &lt;&gt; "Rock" Then MsgBox "Rock Breaks Scissors: Computer Wins"
  ElseIfComputer = "Rock" &amp; Answer &lt;&gt; "Paper" Then MsgBox "Paper Covers Rock: You Win "
  ElseIfComputer = "Paper" &amp; Answer &lt;&gt; "Scissors" Then MsgBox "Scissors Cuts Paper: You Win "
  ElseIfComputer = "Scissors" &amp; Answer &lt;&gt; "Rock" Then MsgBox "Rock Breaks Scissors: You Win "
  ElseIfComputer = "Rock" &amp; Answer &lt;&gt; "Rock" Then MsgBox "TIE "
  ElseIfComputer = "Paper" &amp; Answer &lt;&gt; "Paper" Then MsgBox "TIE "
  Else Computer = "Scissor" &amp; Answer &lt;&gt; "Scissor" Then MsgBox "TIE "
  
  End If
  </code></pre>