Jun 17, 2025
Оfftopic Community
Оfftopic Community
Forums
New posts
Search forums
What's new
Featured content
New posts
New media
New media comments
New resources
New profile posts
Latest activity
Media
New media
New comments
Search media
Resources
Latest reviews
Search resources
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
OnTopic Community
Humor & Jokes
justBASIC knock knock joke game help?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="sasuke101" data-source="post: 2391751" data-attributes="member: 823190"><p>Im a beginner and I am using programming for the absolute beginner. I entered the code statements:/</p><p>nomainwin</p><p></p><p>notice "Click on OK to continue": rem Display a message in a popup window</p><p></p><p>response$ = "Who is there?"</p><p></p><p>prompt "Knock Knock Joke Game" + chr$(13) + "Knock Knock!"; response$</p><p></p><p>if response$ = "" then notice "Knock Knock Joke Game" + chr$(13) +_</p><p>"Error: You must respond by entering 'Who is there?'"</p><p></p><p>else</p><p></p><p>response$ = "Disease who?"</p><p></p><p>prompt "Knock Knock Joke game" + chr$(13) + "Disease!"; response$</p><p></p><p>if response$ = "" then notice "Knock Knock Joke Game" + chr$(13) +_ "Error: You must respond my entering 'Disease who?'"</p><p></p><p>else</p><p></p><p>notice "Knock Knock Joke Game" + chr$(13) +_</p><p></p><p>"Disease this joke seem funny to you?"</p><p></p><p> end if</p><p></p><p> end if</p><p></p><p>.....................................................................................</p><p>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?</p><p>Why does it not let me have "else"</p></blockquote><p></p>
[QUOTE="sasuke101, post: 2391751, member: 823190"] 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" [/QUOTE]
Insert quotes…
Name
Verification
Please enable JavaScript to continue.
Loading…
Post reply
Top