Please help with the following:
ERROR : too many actual parameters on calling class procedure line.
Main UNIT:
procedure TForm1.btnbtbtn1Click(Sender: TObject);
var
bwagwoord,bemail :boolean ;
epos,wagwoord,safvoer :String ;
begin
Form2.qryreg.Close;
form2.qryreg.SQL.Text := 'select * from registertb ';
form2.qryreg.open ;
epos := edt1.text ;
wagwoord := edt2.text ;
safvoer := ' ';
bemail :=form2.qryreg.locate ('Email',epos,[]);
bwagwoord := form2.qryreg.Locate('Wagwoord',wagwoord,[]);
Login.create(epos,wagwoord,bepos,bwagwoord);
Login.toetslog(safvoer);
showmessage(safvoer);
end;
CLASS:
unit cls_login;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, Buttons, math, ExtCtrls;
type
Tlogin = class(Tobject)
private
Fepos :string ;
fwagwoord :string ;
Fbepos : Boolean;
fbwagwoord : Boolean;
Constructor Create(epos,wagwoord:String;bepos, bwagwoord: boolean);
procedure toetslog(var safvoer :string );
public
end;
implementation
{ Tlogin }
constructor Tlogin.Create(epos, wagwoord: String;bepos, bwagwoord: boolean);
begin
fepos := epos ;
fwagwoord := wagwoord ;
fbepos := bepos;
fbwagwoord := bwagwoord;
end;
procedure Tlogin.toetslog( var safvoer :String );
begin
if (fbepos = True) and (fbwagwoord = True)
then
begin
safvoer := 'Welcome '+' '+fepos
end
else
safvoer := 'SORRY VERKEERD HEHE'+' '+fwagwoord ;
end;
end.