Skip to content

Adding argument restrictions to functions

SnekOfSpice edited this page May 22, 2025 · 1 revision

The Arguments tab in Setup > Functions & Variables allows you to further customize the arguments you pass to your scripts.

Default

As the window informs you, you can optionally define a second layer of defaults to function arguments.

Within the argument hint, a double colon ::= means the default comes from DIISIS. A := means it comes from the script itself.

image image

When writing functions, if a default argument is before a mandatory argument, use * to access the default.

Dropdown Typing

Additionally, you can type any String argument as Dropdown.

image

If you do this, the argument needs to be one of the options of the dropdown. e.g. foo(bar:character) and character is a dropdown. You can permit multiple dropdowns as types. Then, the argument will be valid as long as the argument is an option in any one of the dropdowns.

Clone this wiki locally