GetParameterCount

I can’t get the function GetParameterCount to compile

This is the only declaration I can find. The same in two online sources and code helper.

  • Declaration: function GetParameterCount (p : Block) returns Integer

Yet when I try to use it like this:

var
p : PluginBlock
i : int

i= GetParameterCount(p)

I get “Semantic error: Line 247, Col 26: Argument type mismatch”

What am I doing wrong?

You’re not doing anything wrong — the function declaration is missing “autotype” so the generic “Block” isn’t type compatible with your plugin block. I guess you’re the first person to use this — that function has been broken for a long time and nobody noticed. Just fixed it for the next version.
Great catch!