Doesn't read if registered
#1

Alrighty,

Code:
new string[128];
	new Data2[256];
  format(Data2, 255, "fAccounts/Teams/%s.ini", pName(playerid));
	if(fexist(string) == 1)
	{
		new s[128];
	  new loginname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
	  format(s,sizeof(s),"Sveikas sugryzes, %s!\n\nPrisijunk.!",loginname);
	  ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Prisijungimas",s,"Prisijungti","Atsaukti");
  }
  else if(!fexist(string))
  {
	  new s[128];
	  new loginname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
	  format(s,sizeof(s),"Sveikas %s!\n\nPrisiregistruok.!",loginname);
	  ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registarcija",s,"Registruotis","Atsaukti");
  }
if(fexist(string) = 1) is the login, if he is already registered it should show the Login dialog but it always shows Register dialog , can anyone help me?
Reply
#2

You're checking the empty string - string, you should check for Data2 formatted string, and you don't need 256 cells.
Reply
#3

I have a similar problem but it dosent recognise the password when someone enters. Ideas?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)