How I get this split stock working?
#1

Hello, this is the current split stock I use:

pawn Код:
stock split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc))
    {
        if(strsrc[i] == delimiter || i == strlen(strsrc))
        {
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            strdest[aNum][len] = 0;
            li = i+1;
            aNum++;
        }
        i++;
    }
    return 1;
}
And it works sometimes
This time it doesnt work:

pawn Код:
new Coords[16][3];
split(inputtext,Coords, ',');

// Inputtext = : 244.411987,305.032989,999.148437
// Coords[0] = : 244305999.148437
// Coords[1] = : 305999.148437
// Coords[2] = : 999.148437
Somebody knows what the problem is here?

Thanks...
Reply


Messages In This Thread
How I get this split stock working? - by KaleOtter - 29.04.2011, 11:10
Re: How I get this split stock working? - by KaleOtter - 29.04.2011, 13:15
Re: How I get this split stock working? - by MadeMan - 29.04.2011, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)