Hey guys, I was just looking over some of the coding I wrote as a beginner in 2004, and I came across a program that was unfinished and didn't work correctly at all. I attempted, back then, to compare a variable string to the users input to verify that their input was the passoword. But it didn't work and I am not sure as to exactly why, so just for fun could someone explain on it a little for me?
;here's the code
,thanks for any replies guys!
;here's the code
Graphics 800,600,16,1 SetBuffer BackBuffer() Global welcome$ ="Welcome User..." Global passrequest$ = "Password Please...." Global angrypassrequest$ = "Try Again..Password Please..." Global angrypassrequest1$ = "No..No..WRONG...THE PASSWORD IS...?" Global finalangrypassrequest2$ = "Just Give UP Your Obviously not user..." Global done = 0 Global attempts% = 0 Global rite$ = "4hale06" Print welcome$ While Not done = 1 Inputer() CheckPass() Ender() Wend End Function CheckPass() If answer$ = rite$ Print "Welcome Master Anthony, You are God!!!!!!!!!" Delay 5000 done = 1 EndIf If answer$ <> rite$ attempts% = attempts% + 1 Print "Sorry Try Again...." EndIf End Function Function Inputer() If attempts% = 0 answer$ = Input$(passrequest$) Print "password is " + rite$ ElseIf attempts% = 1 answer$ = Input$(angrypassrequest$) ElseIf attempts% = 2 answer$ = Input$(angrypassrequest1$) ElseIf attempts% = 3 answer$ = Input$(finalangrypassrequest2$) EndIf End Function Function Ender() If attempts% > 3 done = 1 EndIf End Function
,thanks for any replies guys!