21.07.2017, 04:04
Quote:
This is the best method I could think of:
pawn Код:
|
Quote:
How about...
Код:
for (new x = 0; x < sizeof(datatesting)-1; x++) { if(strlen(datatesting[x][dmCategory]) < 1) continue; for (new xx = x+1; xx < x; xx++) { if(strlen(datatesting[xx][dmCategory]) < 1) continue; if (strfind(datatesting[x][dmCategory], datatesting[xx][dmCategory]) == 0) // strfind is faster than strcmp { continueLoop = false; // we can't break here the main loop, so we set our variable as false break; // already found a duplicate, stop this duplicate-detector loop ! } } if (continueLoop == false) // if a duplicate one was detected, continue our loop { continueLoop = true; continue; } format(string, sizeof(string), "%s\t%d\n",datatesting[x][dmCategory],x); strcat(fullstr, string); } |
Quote:
Hello, the one provided by IstuntmanI works by changing
pawn Код:
if (strfind(datatesting[x][dmCategory], datatesting[xx][dmCategory]) == 0) |
PHP код:
"Help me man " and "Help me"