FPC message: Wrong number of parameters specified

From Lazarus wiki
Revision as of 01:33, 2 May 2006 by Mattias2 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Missing parameter or too many parameters

You confused the function and forgot a parameter or added a parameter too much.

Missing @

For example:

 Button1.Click := Button1Click;
 

In mode objfpc you must add the @ to tell the compiler, that you want the pointer to the function, not the result of the function:

 Button1.Click := @Button1Click;