29.04.2011, 11:10
Hello, this is the current split stock I use:
And it works sometimes
This time it doesnt work:
Somebody knows what the problem is here?
Thanks...
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;
}
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
Thanks...