Jul-08-2017, 10:42 PM
You are still just checking one at a time. That is not going to solve the problem. You need to get the pin from the user, and then find the account that the pin matches. You are getting the account, getting the pin from the user, and seeing if it matches that account. Then you're saying it's an error when it doesn't match that particular account, even if they entered a valid pin for another account.
In my data dictionary, the keys (1, 2, 3) are the pins. By using
In my data dictionary, the keys (1, 2, 3) are the pins. By using
pin in data
I check that the pin they entered is any valid pin, and only give them an error if their pin doesn't match any account. Then I give the "account" (in this case a string) to the inner loop and let the user do things with it.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures