Skip to content

Latest commit

 

History

History
32 lines (30 loc) · 4.44 KB

syntax.rst

File metadata and controls

32 lines (30 loc) · 4.44 KB

Syntax

A table of the syntax for different operations.

Syntax Operation
:var varName .= <int> Define a new variable
:obj objectiveName <objective> Define a new scoreboard objective
:sobj objectiveName <objective> <target> <assignment operator> <int> Set the value of an objective for a given target (eg. @a or PlayerName)
:var varName <assignment operator> <int> Update the value of an existing variable
:tvar varName Used to test variables in if commands (eg. execute if :tvar varName matches 1)
:func name Define a function. Generates a new mcfunction file
:endfunc Close a function definition.
:call <function> Call a function. Can infer namespace based on directory (see function calling example)
Assignment Operators
+= Add to a variable.
-= Subtract from a variable.
= Set the value of a variable.