Welcome to Phrogram Sign in | Join | Help
in Search


Need help for username password like thing

Last post 07-27-2008, 8:03 AM by phoex. 2 replies.
Sort Posts: Previous Next
  •  07-26-2008, 10:05 PM 6948

    Need help for username password like thing

    HEre is my code for that part. Whenever i type hi it sends up the alert it is wrong what can i do.

    Define hi As String
                Var Name As String = ConsoleReadLine( "Please enter your username:", False )
            If name > hi Then
                Alert("You are wrong","Wrong username")
            End If
            If name = hi Then
                Alert("Yes you are right", "TItle")
                SetConsoleFont("Verdana", 12)
                ConsoleWriteLine( "Hello phoex")
                ConsoleWriteLine(" Welecome to two ship game")
                ConsoleWriteLine("So")
                ConsoleWriteLine("Press Escape for next step")
           
           
                ConsoleWriteLine("")


    :)
    The best progamer
  •  07-27-2008, 1:45 AM 6949 in reply to 6948

    Re: Need help for username password like thing

    Try:

    Define hi As String = "hi"

    Otherwise your variable named hi is empty "" ,and you should use:

    If name <> hi then

    <> stands for not equal and > stands fo greater.

    Michael

  •  07-27-2008, 8:03 AM 6951 in reply to 6949

    Re: Need help for username password like thing

    thanks now it works.

    :)
    The best progamer
View as RSS news feed in XML