22.01.2010, 16:32
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:
and this is my code: (if tmpread contains the first line)
It returns 8 but if I count Pascal, it's still 6.
I hope you understand .
Greetz,
Pascal
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
Код:
new tmpreadl = strlen(tmpread); new tmpreads[128]; valstr(tmpreads, tmpreadl); SendClientMessage(playerid, COLOR_PURPLE, tmpreads);
I hope you understand .
Greetz,
Pascal