08.07.2015, 22:49
Hello dear samp members.. I need some help with function OnPlayerLogin!
ERROR :
With best regards Scrillex
ERROR :
pawn Код:
error 035: argument type mismatch (argument 2)
error 025: function heading differs from prototype
pawn Код:
OnPlayerLogin(playerid, password[]) //ERROR 1 HERE!!
{
new hashPassword[129], uFile[35];
format(uFile, 35, USER_FILE, GetName(playerid));
INI_ParseFile(uFile, "LoadUserData", .bExtra = true, .extra = playerid);
WP_Hash(hashPassword, 129, password);
if(strcmp(PlayerInfo[playerid][pPassword], hashPassword, false))
{
{
SetPVarInt(playerid, "Logged", 1);
}
}
return 1;
}
pawn Код:
case DIALOG_LOGIN:
{
if(response)
{
new strText[179], naslov2[128];
if(strlen(inputtext) >= 4 && strlen(inputtext) <= 35)
{
OnPlayerLogin(playerid, inputtext); //ERROR HERE
}
else
{
format(naslov2, sizeof(naslov2), ""COL_GREEN2" Welcome"COL_WHITE" %s!", GetName(playerid));
format(strText, 179, ""COL_WHITE"______________________________\n\n"COL_GREEN2"Name"COL_WHITE" %s"COL_GREEN2" is registered!\n\n{F81414}You typed wrong password!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, naslov2, strText, "Login", "Exit");
}
}
else Kick(playerid);
}