Need help with this function!! (OnPlayerLogin) - 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: Need help with this function!! (OnPlayerLogin) (
/showthread.php?tid=580866)
Need help with this function!! (OnPlayerLogin) -
Scrillex - 08.07.2015
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
Re: Need help with this function!! (OnPlayerLogin) -
KingServerIRAN - 08.07.2015
Which line does the error shows ??
Re: Need help with this function!! (OnPlayerLogin) -
kyriakos587 - 08.07.2015
lol omg it says in code ERROR HERE
Re: Need help with this function!! (OnPlayerLogin) -
kyriakos587 - 08.07.2015
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