Mirage Engine
Suggestion to add - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+----- Thread: Suggestion to add (/showthread.php?tid=2352)



Suggestion to add - Nean - 07-11-2008

I figured since a lot of websites and other games do this, why not add it to MS4

Code:
If Len(Trim$(Name)) = Len(Trim$(Password)) Then
            Call AlertMsg(Index, "Your name and password must be different!")
            Exit Sub
        End If

Should work. Untested. 3 in the morning. You get the idea.


Re: Suggestion to add - William - 07-11-2008

Why would you want Len() ? Replace the len with lCase instead.


Re: Suggestion to add - Nean - 07-11-2008

William Wrote:Why would you want Len() ? Replace the len with lCase instead.
What's the difference other than the fact that lCase converts it to lower case?


Re: Suggestion to add - GIAKEN - 07-11-2008

He's checking if the name and password are the same length first.


Re: Suggestion to add - William - 07-11-2008

Nean, what you are doing atm is that a account named: Morby and a password named: kol34 wont work. Len returns the length of the string as a integer. I think you mean that the account and password cant be the same name. Instead for the password you might wanna do this:

[code]if len(password)


Re: Suggestion to add - Matt - 08-11-2008

No, you had it right at first.

He means:

if lcase(name) = lcase(password) then
Call that alert sub thingy
exit sub
end if


Re: Suggestion to add - William - 08-11-2008

Yeah I know I was right. But both the ways I posted could be good actually. So that the name and password cant be the same name, and the password needs to be 7symbols or higher.