Posts: 2,593
Threads: 34
Joined: Dec 2007
Quote:
Originally Posted by RyDeR`
pawn Code:
stock randomString(strDest[], strLen = 10) { while(strLen--) strDest[strLen] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0'); }
Example:
pawn Code:
new string[10] ; randomString(string, 10);
|
string[9] = random(bla bla) = crash, must be +1
:> string[10] = EOS