Thread: [Tutorial] Pre-sized random strings
View Single Post
Old 20/11/2019, 04:47 PM   #2
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,773
Reputation: 858
Default Re: Pre-sized random strings

Why not just:
pawn Code:
stock SizedRandomUpperCharacters(size) {
    new str[128];
    for (new i = 0; i < size; i++) {
        format(str, sizeof(str), "%s%c", str, RandomEx(1, 26));
    }

    return str;
}

...and similar to other cases too.

This doesn't seem like a tutorial anyways, i don't see any usage examples (your test command isn't really an example tbh) either.

I think this post belongs here: https://forum.sa-mp.com/showthread.php?t=281
__________________

Follow me on Github: Donate on Paypal to show your support:

Gammix is offline   Reply With Quote