Custom Blocks

Custom blocks are called procedures.

proc my_procedure arg1, arg2, type_name arg_name {
    # code
}

Arguments

Use arguments by prefixing `$` to the argument name.

proc my_procedure arg1, arg2 {
    say $arg1;
}

Calling custom blocks

my_procedure arg1, arg2;

Scratch Addons & Turbowarp Blocks

goboscript supports the Scratch Addons' debugger addon blocks, and TurboWarp blocks.

`breakpoint`

The Scratch Addons' debugger addon block to set a breakpoint.

breakpoint;

`log`

The Scratch Addons' debugger addon block to log a value.

log expr;

`warn`

The Scratch Addons' debugger addon block to log a warning.

warn expr;

`error`

The Scratch Addons' debugger addon block to log an error.

error expr;

`is compiled?` boolean reporter

The TurboWarp block to report whether the project is running in compiled mode.

say $tw_is_compiled;

`is TurboWarp?` boolean reporter

The TurboWarp block to report whether the project is running in TurboWarp.

say $tw_is_turbowarp;

`is forkphorus?` boolean reporter

The TurboWarp block to report whether the project is running in forkphorus.

say $tw_is_forkphorus;

Source