Help

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
User avatar
Nickster
Newbie
Posts:2
Joined:Wed May 29, 2002 4:22 am
Help

Post by Nickster » Wed May 29, 2002 4:26 am

I am new here so I don't know if I can post this question here or not if I can't can you point me in the right direction? Thanks. Heres my question:
What is wrong with this soure code when you type no it doesn't follow the IF choice = y THEN GOTO 120good

01 Color 07
10 Print "Welcome to the team Soldier.
20 print "Sorry I didn't get your name."
30 print "Enter name"
40 input username$
50 print "ahh well, welcome "; username$; "."
60 Print "Your first mission is handling this computer system."
70 Print "Do you have any expirence in computers? <yes no>"
80 input yes
90 If choice = yes THEN goto 120good
100 If choice = no THEN goto 110bad
110bad print "well that is ok. We need someone right away."
120good print "your first mission is get into the russian nuclear wepon silo the server is only down for a few minutes. Understand? <Y N>"
130 input choice2 &nbsp;
140 if choic2e = y THEN goto 180ok
150 if choice2 = n THEN goto 160poo
160poo print "Too bad you die!"
170 goto 10
180ok print "Good luck."
190 Color 10
200 Print "Russian Nuclear Silo"
210 Print "Username:"; username2$
220 input username2$
230 print "Password:"
240 input 12345
250 Print "Username and Password Accepted!
260 Print "The username "; username2$; " Is a low level username"
270 Print "Shutdown Systems. Is your only option"
280 Print "Shutting down press any key."
290 input close
300 goto 10
310 end

can you tell me whats wrong thanks in advance.
Some of you will perish while I will survive I am the ultimate fighter.

User avatar
frankiebaby
Global Moderator
Posts:95
Joined:Tue Apr 30, 2002 1:38 am
Location:Pennsylvania
Contact:

Re: Help

Post by frankiebaby » Wed May 29, 2002 7:56 am

your problem seems to be the kind of data you are inputting, you need to read in strings to be Y/N, and when checking to see if a string ='s something, you need the string in quotes.... heres the changes, highlited.... this should be a copy and paste deal, should run perfectly as it is


01 Color 07
10 Print "Welcome to the team Soldier. &nbsp;
20 print "Sorry I didn't get your name." &nbsp;
30 print "Enter name"
40 input username$
50 print "ahh well, welcome "; username$; "."
60 Print "Your first mission is handling this computer system."
70 Print "Do you have any expirence in computers? <yes no>"
80 input choice$ &nbsp; &nbsp; &nbsp;'note the string symbol ($)
90 If choice$ = "Y" THEN goto 120
100 If choice = "N" THEN goto 110
110 print "well that is ok. We need someone right away."
120 print "your first mission is get into the russian nuclear wepon silo the server is only down for a few minutes. Understand? <Y N>"
130 input choice2$ &nbsp;
140 if choice2$ = "Y" THEN goto 180
150 if choice2$ = "N" THEN goto 160 &nbsp;
160 "Too bad you die!"
170 goto 10
180 print "Good luck."
190 Color 10
200 Print "Russian Nuclear Silo"
210 Print "Username:"; username2$ 'by the way, this is useless
220 input username2$
230 print "Password:"
240 input password$
250 Print "Username and Password Accepted!
260 Print "The username "; username2$; " Is a low level username"
270 Print "Shutdown Systems. Is your only option"
280 Print "Shutting down press any key."
290 input close$
300 goto 10
310 end &nbsp;

User avatar
Nickster
Newbie
Posts:2
Joined:Wed May 29, 2002 4:22 am

Re: Help

Post by Nickster » Wed May 29, 2002 8:18 am

Hey Thanks it works. Thanks =)
Some of you will perish while I will survive I am the ultimate fighter.

Jacobo
Newbie
Posts:1
Joined:Fri Jun 21, 2002 5:03 am
Location:Venezuela
Contact:

control codes for printers

Post by Jacobo » Fri Jun 21, 2002 5:14 am

I am trying to locate the control codes for epson Stylus ink jet to improve appearence of print-outs.
I tried epson web page with out luck.
Whe re can I find these codes??
Thanks

Post Reply