Why does WSH throw an error on my code saying that there is an
"expected statement" in line 1 character 1.
Here is my code:
type = inputbox("What would you like to calculate with? (m = muliplication, d = division, a = addition, s = subtraction)")
if type = not "m" or "s" or "a" or "d" or "M" or "S" or "A" or "D" then
a=msgbox("You did not select one of the options.")
elseif type = "m" or "M" then
input1 = inputbox("You chose multiplication. What is the first number of your math sentence?")
input2 = inputbox("What is the other number of your math sentence?")
output = input1 * input2
display = msgbox("The answer to " & input1 & " " & chrw(0215) & " " & input2 & " is " & output & ".")
elseif type = "d" or "D" then
input1 = inputbox("You chose division. What is the dividend of your math sentence?")
input2 = inputbox("What is the divisor of your math sentence?")
output = input1 \ input2
display = msgbox("The answer to " & input1 & " " & chrw(247) & " " & input2 & " is " & output & ".")
elseif type = "a" or "A" then
input1 = inputbox("You chose addition. What is the first number of your math sentence?")
input2 = inputbox("What is the other number of your math sentence?")
output = input1 + input2
display = msgbox("The answer to " & input1 & " + " & input2 & " is " & output & ".")
elseif type = "s" or "S" then
input1 = inputbox("You chose subtraction. What is the first number of your math sentence?")
input2 = inputbox("What is the other number of your math sentence?")
output = input1 - input2
display = msgbox("The answer to " & input1 & " - " & input2 & " is " & output & ".")
end if
I know this is kind of obvious but I don't see any error on line 1 char 1.
Please explain to me how to fix this.