27.08.2011, 08:47
Quote:
|
Is there any function for randomizing letters?
I would just use random(26) and a series of case but that'll just slow down the code. Just curious if someone had done this the easy and faster kind of way. |
pawn Код:
random(26) + 'a'; // non-captial letters
random(26) + 'A'; // captial letters
Quote:
|
Well the only way I know of would be to use random bounds
pawn Код:
which I think is 0x61 to 0x7A So the code would be RandomBounds(0x61, 0x7A); (sorry I forgot the actual numbers for some reason I can only remember the hex) Hope that helps ... if it's right (should be I think!) |
pawn Код:
RandomBounds('a', 'z');
RandomBounds('A', 'Z');



... if it's right (should be I think!)