strfind vs ~n~? bug? keeps returning 13
#1

pawn Код:
new Rows = 0, Currentrow = 0, R = -1;
    for(new i = 0; i != 14; i++)
    {
        R = strfind(text, "~n~", true, Currentrow);
        if(R != -1)
        {
            Rows ++;
            Currentrow = R;
            printf("Currentrow: %d", Currentrow);
        }
    }
    printf("Rows: %d", Rows);;
I'm trying to find how many "~n~"'s are in a text. now the text i tested this is

pawn Код:
"~n~Hello~n~"
notice: 2 ~n~'s

i also tested it with 9 ~n~'s, and it keeps returning 13
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)