Fri August 15 2003, 12:30 PM
*Bloodhunter*Unter!
Can u show me a function to randomize an string variable. (Just an example) Please i need it.
Fri August 15 2003, 06:08 PM
MinistrationIn any code or UScript?
Fri August 15 2003, 11:20 PM
*Bloodhunter*yes

Sat August 16 2003, 02:16 AM
*Bloodhunter*u script i mean ....
Sun August 17 2003, 09:32 PM
Unter den UebrigenOriginally posted by *Bloodhunter*:
Can u show me a function to randomize an string variable. (Just an example) Please i need it.
The following function takes the parameter
iLen, specifying how many characters you'd like the string to be:
function string strRandom (int iLen)
{
local int i, iAsc;
local string str;
for (i = iLen; bool(i--); i = i) {
iAsc = rand(122);
while (!(iAsc >= 48 && iAsc <= 57)
&& !(iAsc >= 65 && iAsc <= 90)
&& !(iAsc >= 97 && iAsc <= 122)) {
iAsc = Rand(122);
}
str = str $ chr(iAsc);
}
return str;
}
Mon August 18 2003, 03:49 AM
*Bloodhunter*k thxs for the small example
