View Single Post
Old 03-06-2005, 03:17 AM   #1 (permalink)
P3t3r
 
Newb Techie

Join Date: Sep 2004

Posts: 20

P3t3r

Default A little help with Quickbasic.

Hi, I can't figure out what wrong is with this code... Anyone experienced with Quickbasic know what's wrong with it?

***********Start of code*************

DIM userid AS STRING 'Ask user for userid
DIM password AS INTEGER 'Ask user for password


CLS
COLOR 2

PRINT "Welcome to Peter's Secure Network Login System"
PRINT "Version 1.0"
SLEEP 2
PRINT "Please enter your User ID to continue."
INPUT "Userid"; userid
IF userid = Peter THEN
PRINT "Please enter your password to continue."
ELSEIF userid = Peteriscool THEN
PRINT "Please enter your password to continue."
ELSE
PRINT "Invaild Userid, you have 1 more chance to enter it again."
END IF

**********End of Code ***********
The program give me the type mismatch error on userid =Peter and userid= Peteris cool. When I add a $ to them, the program runs but not the way I want to. There is only 1 response instead of the 3 it suppose to have.

Thanks.
P3t3r is offline