split doesn't work
#1

Hello sa-mp.com forum,
i need help with split. I want to split the string data into the array tmp. I did it with this function:
Код:
forward split(const strsrc[], strdest[][], delimiter);
public 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++;
    }
}
Here I used the function:
Код:
new tmp[13][128];
split(data,tmp,"|");
This is what the compiler says:
Код:
error 035: argument type mismatch (argument 3)
to the line with split(..);
Reply


Messages In This Thread
split doesn't work - by r0b - 06.08.2010, 14:54
Re: split doesn't work - by JaTochNietDan - 06.08.2010, 14:57
Re: split doesn't work - by r0b - 06.08.2010, 14:58
Re: split doesn't work - by JaTochNietDan - 06.08.2010, 15:00
Re: split doesn't work - by r0b - 06.08.2010, 15:02

Forum Jump:


Users browsing this thread: 4 Guest(s)