How to separate numbers by comma?
#4

I made you a function, hopefully this is what you want

pawn Код:
stock Comma(numbers) //by Gamer931215
{
    new temp[24],counter = -1;
    valstr(temp,numbers);
    for(new i = strlen(temp);i > 0; i--)
    {
        counter++;
        if(counter == 3)
        {
            strins(temp,",",i);
            counter = 0;
        }
    }
    return temp;
}
Edit: oh did slice ? well anyways this should work as well
Reply


Messages In This Thread
How to separate numbers by comma? - by Bloude - 03.06.2011, 16:49
Re: How to separate numbers by comma? - by jameskmonger - 03.06.2011, 16:58
Re: How to separate numbers by comma? - by Bloude - 03.06.2011, 17:03
Re: How to separate numbers by comma? - by gamer931215 - 03.06.2011, 17:09
Re: How to separate numbers by comma? - by jameskmonger - 03.06.2011, 21:52

Forum Jump:


Users browsing this thread: 1 Guest(s)