[Tutorial] Pre-sized random strings
#2

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://sampforum.blast.hk/showthread.php?tid=281
Reply


Messages In This Thread
Pre-sized random strings - by OuDayas - 20.11.2019, 16:33
Re: Pre-sized random strings - by Gammix - 20.11.2019, 16:47

Forum Jump:


Users browsing this thread: 1 Guest(s)