Login help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Login help (
/showthread.php?tid=513683)
Login help -
jamjamnewbie - 17.05.2014
The error is this
E:\samp server 0.3z\pawno\include\reglog.inc(70) : error 025: function heading differs from prototype
E:\samp server 0.3z\gamemodes\Gamemode.pwn(370) : error 035: argument type mismatch (argument 2)
This is from the include file
Код:
OnPlayerLogin(playerid, password[]) //line 70
{
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;
}
And this is from the gamemode
Код:
case DIALOG_LOGIN: {
if(response) {
new strText[179];
new naslov2[128];
if(strlen(inputtext) >= 4 && strlen(inputtext) <= 35) {
OnPlayerLogin(playerid, inputtext); //line 370
} 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);
}
}
Re: Login help -
Rittik - 17.05.2014
Just simply use reg/log system by Kush with YSI.