Computer can't count :)
#1

Hello,

I'm making a login script but when I want to read a line from a file and compare it with stringcompare it returns false. Now I've found that if there is a line below, the characters for a new line (\r\n) are counted too. See Wiki and then strcmp. So I want to cut them of with strlen, but then they are also counted.

So if the file is this:

Код:
Pascal
125
and this is my code: (if tmpread contains the first line)

Код:
new tmpreadl = strlen(tmpread);
new tmpreads[128];
valstr(tmpreads, tmpreadl);
SendClientMessage(playerid, COLOR_PURPLE, tmpreads);
It returns 8 but if I count Pascal, it's still 6.

I hope you understand .


Greetz,
Pascal
Reply
#2

Kaaaa, bump. --srry --
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)