Im a beginner and I am using programming for the absolute beginner. I entered the code statements:/
nomainwin
notice "Click on OK to continue": rem Display a message in a popup window
response$ = "Who is there?"
prompt "Knock Knock Joke Game" + chr$(13) + "Knock Knock!"; response$
if response$ = "" then notice "Knock Knock Joke Game" + chr$(13) +_
"Error: You must respond by entering 'Who is there?'"
else
response$ = "Disease who?"
prompt "Knock Knock Joke game" + chr$(13) + "Disease!"; response$
if response$ = "" then notice "Knock Knock Joke Game" + chr$(13) +_ "Error: You must respond my entering 'Disease who?'"
else
notice "Knock Knock Joke Game" + chr$(13) +_
"Disease this joke seem funny to you?"
end if
end if
.....................................................................................
so when I hit run it says BASIC compile halted:ELSE without if/THEN and it highlights the first "else" I typed. I am using WIndows Vista and copied from the book so can someone please tell me what I am doing wrong?
Why does it not let me have "else"
nomainwin
notice "Click on OK to continue": rem Display a message in a popup window
response$ = "Who is there?"
prompt "Knock Knock Joke Game" + chr$(13) + "Knock Knock!"; response$
if response$ = "" then notice "Knock Knock Joke Game" + chr$(13) +_
"Error: You must respond by entering 'Who is there?'"
else
response$ = "Disease who?"
prompt "Knock Knock Joke game" + chr$(13) + "Disease!"; response$
if response$ = "" then notice "Knock Knock Joke Game" + chr$(13) +_ "Error: You must respond my entering 'Disease who?'"
else
notice "Knock Knock Joke Game" + chr$(13) +_
"Disease this joke seem funny to you?"
end if
end if
.....................................................................................
so when I hit run it says BASIC compile halted:ELSE without if/THEN and it highlights the first "else" I typed. I am using WIndows Vista and copied from the book so can someone please tell me what I am doing wrong?
Why does it not let me have "else"