Getting length of an integer?
#6

pawn Код:
new randnum, str[8];
Rand:  
    randnum = random(9999999);
    format(str, sizeof str, "%d", randnum);
    if(strlen(str) != 7) { goto Rand; }
PlayerData[playerid][PhoneNumber] = strval(randnum);
Thanks, strval added to remove tag mismatch warnings.
Reply


Messages In This Thread
Getting length of an integer? - by jameskmonger - 11.07.2011, 21:46
Re: Getting length of an integer? - by Roko_foko - 11.07.2011, 22:00
Re: Getting length of an integer? - by jameskmonger - 11.07.2011, 22:01
Re: Getting length of an integer? - by Macluawn - 11.07.2011, 22:06
Re: Getting length of an integer? - by Shadoww5 - 11.07.2011, 22:07
Re: Getting length of an integer? - by jameskmonger - 11.07.2011, 22:11
Re: Getting length of an integer? - by Jefff - 11.07.2011, 22:15
Re: Getting length of an integer? - by RyDeR` - 11.07.2011, 22:17
Re: Getting length of an integer? - by Shadoww5 - 12.07.2011, 01:52
Re: Getting length of an integer? - by Calgon - 12.07.2011, 03:08

Forum Jump:


Users browsing this thread: 1 Guest(s)