number digit (s digit)
#1

Hello!

I am looking for a code, which converts a number like this:

12000 -> 12 000 or 12.000
(if the number is bigger, then like this: 123456789 -> 123.456.789)

I didnt know how i should search for it, so i ask for your help!
Reply
#2

I don't think there is such converter.. :P
Reply
#3

Use a string splitter.
Reply
#4

there is such a converter wait while ima search it

EDIT:cant find it... search on wiki im sure it is there
Reply
#5

It's possible to make a coverter in PAWN.
Reply
#6

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
It's possible to make a coverter in PAWN.
Yeah pay Ryder 50 $ and he makes one lol..... :P
Reply
#7

Zezombia at the Little Coding thread made the code.

I paste it, if someone needs it, he can find it.

pawn Код:
ConvertNumber(number)
{
    new num[16], count;
    valstr(num, number);
   
    for(new i = strlen(num); i > 0; i--)
    {
        if(count == 3)
        {
            count = 0;
            strins(num, ".",  i);
        }

        count++;
    }
   
    return num;
}
Reply
#8

Quote:
Originally Posted by [DK]JaloNik
Посмотреть сообщение
Yeah pay Ryder 50 $ and he makes one lol..... :P
lol, not that. I'd do it free but he found one, so .. ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)