Random numeric strings
#7

Quote:
Originally Posted by varthshenon
View Post
Another.
pawn Code:
valstr(string,random(9999));
IDK which one is faster.
I need the string to end up being 6 characters total. I'm just doing this:

pawn Code:
stock randNumber()
{
    new szString[13];
    format(szString, sizeof(szString), "%d%d%d%d%d%d", random(9), random(9), random(9), random(9), random(9), random(9));
    return szString;
}
Reply


Messages In This Thread
Random numeric strings - by Scenario - 18.08.2011, 01:39
Re: Random numeric strings - by JaTochNietDan - 18.08.2011, 02:00
Re: Random numeric strings - by Scenario - 18.08.2011, 02:02
Re: Random numeric strings - by =WoR=Varth - 18.08.2011, 02:09
Re: Random numeric strings - by Scenario - 18.08.2011, 03:09
Re: Random numeric strings - by =WoR=Varth - 18.08.2011, 03:32
Re: Random numeric strings - by Scenario - 18.08.2011, 03:34
Re: Random numeric strings - by =WoR=Varth - 18.08.2011, 03:40
Re: Random numeric strings - by Scenario - 18.08.2011, 03:44
Re: Random numeric strings - by DRIFT_HUNTER - 18.08.2011, 03:45
Re: Random numeric strings - by =WoR=Varth - 18.08.2011, 03:52
Re: Random numeric strings - by Scenario - 18.08.2011, 04:18
Re: Random numeric strings - by PrawkC - 18.08.2011, 04:19
Re: Random numeric strings - by Scenario - 18.08.2011, 04:22
Re: Random numeric strings - by PrawkC - 18.08.2011, 04:23
Re: Random numeric strings - by Scenario - 18.08.2011, 04:44
Re: Random numeric strings - by iggy1 - 18.08.2011, 06:16
Re: Random numeric strings - by marrcko - 18.08.2011, 08:05
Re: Random numeric strings - by TouR - 18.08.2011, 08:16
Re: Random numeric strings - by Scenario - 18.08.2011, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)