registration
#2

well now im down to this

i defined new HPW; at the top of the script and now i get this
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 1)
	{
		TogglePlayerControllable(playerid, 0);
	  new file[128], pname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, pname, sizeof(pname));
	  format(file, sizeof(file), "\\Users\\%s.ini", pname);
		if(response == 1)
		{
		dini_Create(file);
	  dini_IntSet(file, "hashPW", udb_hash(inputtext));
	  dini_Set(file, "password", inputtext);
	  dini_IntSet(file, "level", 0);
	  dini_IntSet(file, "score", GetPlayerScore(playerid));
	  dini_IntSet(file, "money", GetPlayerMoney(playerid));
	  new string[128];
	  format(string, 128, "You succesfully registered the nickname %s with password %s", pname, inputtext);
	  SendClientMessage(playerid, 000000, string);
	  logged[playerid] = 1;
	  SendClientMessage(playerid, 0000000, "You have been automatically logged in!");
		TogglePlayerControllable(playerid, 1);
		}
		if(response == 0)
		{
		  SendClientMessage(playerid, 0xFFFF0000, "You must log in or register to use this server");
		}
		return 1;
	}
	if(dialogid ==2)
	{
		TogglePlayerControllable(playerid, 0);
 		new file[256];
	  new string[256], pname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, pname, sizeof(pname));
	  format(file, sizeof(file), "\\Users\\%s.ini", pname);
    if(response == 1)
	  HPW = dini_Get(file, "hashPW");  //<---------------------------------------------- is line 275
	  if(udb_hash(inputtext) != HPW)
	  {
	    format(string, 256, "You specified the wrong password for %s!", pname);
	    SendClientMessage(playerid, 000000, string);
	    ShowPlayerDialog(playerid, 2, 1,"Wrong Password", "That Password is incorrect. Please try again.","login", "cancel");
	  }
	  else
	  {
	    logged[playerid] = 1;
	    level[playerid] = dini_Int(file, "level");
			SetPlayerScore(playerid, dini_Int(file, "score"));
			GivePlayerMoney(playerid, dini_Int(file, "money")-GetPlayerMoney(playerid));
	    SendClientMessage(playerid, 0000000, "You have succesfully logged in!");
	    printf("%s (%i) logged in with password %s", pname, playerid, inputtext);
	  }
  		if(response == 0)
		{
		  SendClientMessage(playerid, 0xFFFF0000, "You must log in or register to use this server");
		}
	  return 1;
	}
	return 1;
}
with error

Код:
D:\...\samp\filterscripts\DAdmin.pwn(275) : error 006: must be assigned to an array
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
please help, im begging you D:<
any help is very helpfull
Reply


Messages In This Thread
registration - by BLAbla93 - 27.11.2009, 22:20
Re: Help With Registration system in dialog responce. - by BLAbla93 - 28.11.2009, 02:04
Re: registration - by Devine - 28.11.2009, 03:55
Re: registration - by DracoBlue - 28.11.2009, 08:35
Re: registration - by BLAbla93 - 28.11.2009, 14:03

Forum Jump:


Users browsing this thread: 1 Guest(s)