Return function on script

Hi i like the new script function very much so good work guys.

But how is it possible to return a value in a return function?
So how can i return the doBypass variable here?

Greetings, Michael

Function GetBypassVst1(res : boolean) Returns boolean
var doBypass : boolean
doBypass = true

End

And 2nd question… Is there and And and Or operator for the if statements?

Assign your value to a special variable called result

 result = 42

You can use
&&
||
!
for AND, OR and NOT respectively

Thx a lot this worked.

I have another one…

when i try to do this in the global declaration block I get an Unexpected error from the logger.

var PArrayVst :PluginBlock[2]

This works fine with Widgets as well as primitive types.

Any Idea?

NYI (Not yet implemented)

I’ve been overhauling memory management for dynamic arrays and hadn’t gotten around to supporting arrays of anything yet, just a few special cases. Hopefully coming soon.

GP Script is still evolving.

Array of PluginBlock type is implemented in 2.0.15 which we just released today