22.12.2009, 03:47
I have an array such as
Example[X][Y][Z][ID]
I need to split that into parts so I can easily make expressions. Does anyone know how? I was recently thinking of this....
I just got a feeling that wont work though. Please help me! Thanks.
Example[X][Y][Z][ID]
I need to split that into parts so I can easily make expressions. Does anyone know how? I was recently thinking of this....
pawn Код:
new result[128][5];
split(Example[X][Y][Z][ID], result, ']');
if(result[3] == playerid) print("I R WON PRISE!");
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;
}