Reputation: 149
I have this line of code throwing up the above error:
server:=TIdHTTPServer.Create;
server.OnQuerySSLPort(8092,true);
I've read about using the right vars/constants but that doesn't seem to work.
Any help, appreciated
Upvotes: 1
Views: 2319
Reputation: 108963
A var
parameter is passed by reference (that is, the method doesn't want only a value, but a variable (which comes with a value), which it can alter if necessary), so you need to pass a variable (of the right type), not only a value. This works:
var
mybool: boolean;
begin
mybool := true;
server := TIdHTTPServer.Create;
server.OnQuerySSLPort(8092, mybool);
// Now mybool can be either true or false; it's up to the method.
Upvotes: 4