07.05.2017, 04:41
Quote:
|
cache_get_value(0, "Elite", pEliteString[playerid]); new ch[5] = ";"; new d = 0; while(pEliteString[playerid][d] != EOS) { if(!strcmp(pEliteString[playerid][d], ch)) printf("pEliteString every char that isn't ch var: ", pEliteString[playerid][d]); d++; } |

BTW, you're comparing a character with a string. You could just use the == operator for that.
PHP код:
new ch = ';';
if(pEliteString[playerid][d] == ch) //do something.
PHP код:
stock split(const src[], dest[][], const delimiter) //Define this function somewhere else, found at sa-mp wiki
{
new n_pos,num,old,str[1];
str[0] = delimiter;
while(n_pos != -1)
{
n_pos = strfind(src,str,false,n_pos+1);
strmid(dest[num++], src, (!num)?0:old+1,(n_pos==-1)?strlen(src):n_pos,256);
old=n_pos;
}
return 1;
}
new output[20][1]; // 20 == number of maximum ";" would apper, 1 == size of the string between each ";" (in this case it seem to be just 1 or 0, so just defined as 1 at max.
split(pEliteString[playerid],output,';');
