error 035: argument type mismatch (argument 2)
#6

Quote:
Originally Posted by Joe Torran C
Do you know any register commands for this?
As mine dosent look like its saving
ummm, i do not, sorry.

Here one a made a loooong time ago (i still use it lol, it works fine ... just a bit.. eh messy)

Код:
dcmd_register(playerid, params[])
{
	if(!sscanf(params, "s[40]", pData[playerid][Password]))
	{
		if(pData[playerid][IsRegistered] == false)
		{
			new SkinID = GetPlayerSkin(playerid);
			GetPlayerIp(playerid, pData[playerid][IP], 16);
			mysql_real_escape_string(pData[playerid][Password],String);
			format(String2, sizeof(String2), "INSERT INTO `users` (Name,Password,Skin,IP) VALUES('%s', SHA1('%s'), %d, '%s')", pData[playerid][Name],pData[playerid][Password],SkinID,pData[playerid][IP]);
			mysql_query(String2);

			format(String, sizeof(String), "Registration successful! Please remember your user name (%s) and password (%s)!",pData[playerid][Name],pData[playerid][Password]);
			SendClientMessage(playerid, yellow, String);
			SendClientMessage(playerid, white, "You have been automatically logged in.");
			pData[playerid][IsRegistered] = true;
			pData[playerid][LoggedIn] = true;
			return 1;
		}
		format(String, sizeof(String), "Error: Username \"%s\" is already registered, please chose a different nick name!",pData[playerid][Name]);
		SendClientMessage(playerid, red, String);
 		return 1;
	}
	SendClientMessage(playerid, red, "Error: /register <Password>");
	return 1;
}
will need to edit it to work of course.


EDIT: if you use the sha1 encryption, make sure the password length in your db is at least 40.
Reply


Messages In This Thread
error 035: argument type mismatch (argument 2) - by Torran - 10.03.2010, 12:01
Re: error 035: argument type mismatch (argument 2) - by Kyosaur - 10.03.2010, 12:26
Re: error 035: argument type mismatch (argument 2) - by Torran - 10.03.2010, 12:26
Re: error 035: argument type mismatch (argument 2) - by Kyosaur - 10.03.2010, 12:33
Re: error 035: argument type mismatch (argument 2) - by Torran - 10.03.2010, 12:41
Re: error 035: argument type mismatch (argument 2) - by Kyosaur - 10.03.2010, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)