E2001 Ordinal Type required
E2035 Not enough parameters
I worked from an existing program I found online. I did not change a thing:
Delphi #176 - InputQuery Part II - Password Masking
This is the program I worked from:
procedure TfrmMarvelM.btnNextClick(Sender: TObject);
var
Values : TArray<string>;
begin
if rgpUser.ItemIndex = 0 then
begin
SetLength(Values, 2);
if InputQuery('Log In', ['Username', #0'Password'], Values, ValidationInput) then //This is were I get an error
begin
frmAdmin.Show;
end
...
end;
function TfrmMarvelM.ValidationInput(const Values: array of string): Boolean;
begin
result := SameText(Values[0], 'PointBreak') and SameText(Values[1], '3012');
if not result then
ShowMessage('Password Incorrect. Try again');
end;