06.08.2010, 14:54
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:
Here I used the function:
This is what the compiler says:
to the line with split(..);
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++; } }
Код:
new tmp[13][128]; split(data,tmp,"|");
Код:
error 035: argument type mismatch (argument 3)