Run Function (Section) (Section) — SkCheese

Addon: SkCheese · Category: Section · Since: 1.0 (1.7 Breaking Syntax Change)

Syntax

(execute|run) function <.+> [with arg[ument]s]

Description

Executes a function using a section. Pass parameters by doing 'parameter name as value'

Examples

function add(1: int, 2: int):
  broadcast {_1} + {_2}

execute function add:
  1 set to 5   # (the order of the parameters don't matter)
  2 set to 10
broadcast {_result} # 15

View source