Need help with this function!! (OnPlayerLogin)
#1

Hello dear samp members.. I need some help with function OnPlayerLogin!

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);
        }
With best regards Scrillex
Reply
#2

Which line does the error shows ??
Reply
#3

lol omg it says in code ERROR HERE
Reply
#4

I think you have to make it forward OnPlayerLogin(playerid, inputtext[]);

after go to OnPlayerLogin and make public OnPlayerLogin

and i think you will fix that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)