Problem with File
#1

ok my problem its when i do wrong password it send me wrong password but when i do correct password its still send me wrong password

this is my code:


Код:
	if(dialogid == 1)
	{
	    new string[256];
	    if(!strlen(inputtext) || !response) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"дшщод","{DB881A}Fun-DeathMatch{00688B} бшелйн дбайн мщшъ\n\r айрк шщен мщшъ жд \n\r дчщ аъ сйсоък лгй мдшщн","айщеш","бйием");
		new File:pfile = fopen(file, io_write);
		format(string,sizeof(string),"Name:%s\r\nPassword:%s",GetName(playerid),inputtext);
		fwrite(pfile, string);
		fclose(pfile);
		Logged[playerid] = 1;
	}
	if(dialogid == 2)
	{
 		new pass[40],Line[256];
        new File:pfile = fopen(file, io_read);
        while (fread(pfile, Line, 256))
        {
            if(strcmp(Line,"Password",true,strlen(pass)) == 0)
            {
                new e = strfind(Line, "=", false);
                strcat(pass,Line[e+1]);
            }
        } fclose(pfile);

     	while(pass[strlen(pass)-1] == '\r' && pass[strlen(pass)-1] == '\n')
		{
			strdel(pass,strlen(pass)-1,strlen(pass));
		}
        if(strcmp(pass,inputtext,true) == 0)
        {
            SendClientMessage(playerid, 0xffffffff,"correct password");
        } else {
            SendClientMessage(playerid, 0xffffffff,"Wrong Password");
        }
  }
Reply
#2

UPP plz help me
Reply
#3

Are you getting any warning?
Reply
#4

Nope
Reply
#5

UPP plz help me why nobody help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)