#130950 - 2004-12-09 11:11 PM
Re: Masking User ID
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Code:
$moduserid=($number+'334455')
|
Top
|
|
|
|
#130954 - 2004-12-09 11:34 PM
Re: Masking User ID
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Try something more like this....
Code:
?"Enter USer ID "Gets $userid If InStr ($userid,"z") $letter="26" EndIf
$number=SubStr ($userid,2,8) $moduserid=$letter+334455
? 'Mod User ID: ' + $moduserid
|
Top
|
|
|
|
#130956 - 2004-12-09 11:43 PM
Re: Masking User ID
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Try removing the quotes from the $letter="26" line like below.
Code:
?"Enter USer ID : "Gets $userid If InStr ($userid,"z") $letter=26 EndIf
$number=SubStr ($userid,2,8) $moduserid=$letter+334455
? 'Mod User ID: ' + $moduserid
|
Top
|
|
|
|
#130961 - 2004-12-09 11:51 PM
Re: Masking User ID
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Nope, not a VAL issue
The $letter="26" should be $letter=26
By placing quotes around it modifies it to text.
Code:
?"Enter USer ID "Gets $userid If InStr ($userid,"z") $letter=26 EndIf
$number=SubStr ($userid,2,8) $moduserid=($letter + 334455)
? 'Mod User ID: ' + $moduserid
|
Top
|
|
|
|
#130966 - 2004-12-10 12:02 AM
Re: Masking User ID
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Okay, sorry. Yes, Al's code works then.
Code:
Break On ?"Enter USer ID " Gets $userid If InStr ($userid,"z") $letter="26" EndIf $number=val(SubStr ($userid,2,8)) $moduserid=($number+334455) ? $moduserid
|
Top
|
|
|
|
#130967 - 2004-12-10 12:02 AM
Re: Masking User ID
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
So something like this should do the trick.
Code:
?"Enter USer ID : "Gets $userid If InStr ($userid,"z") $letter="26" EndIf $number=Val(SubStr($userid,2,8)) $moduserid=$letter+($number+334455) ? 'Mod User ID: ' + $moduserid
You could also use the Int() where Val() is used as well. When I run the above and enter in Z12345678 for the ID it returns 2612680133...
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 718 anonymous users online.
|
|
|