Block Arena Server Commands
One can toggle the console by pressing the '~' key.
Commands can be entered while in the console. For example, entering the command "move forward start" will cause the player to start moving forward.
All commands return a value. One can input complex commands using S-expressions. For example, "echo (vec 1.0 2.0 3.0)" will print "1 2 3" to the console. The outermost S-expression should not have parentheses around it. For another example, "echo (if (== (+ 2 3) 5) 1 0)" will print "1" to the console.
The dollar sign '$' followed by a string literal is syntactic sugar for the "get" command.
One can list all the commands from the console using the help command. This can also be used to print information about individual commands. All that help information is included in this html document. In fact, this document was generated using the "gendoc" command.
There are actually two consoles: one for the client, and one for the server. One can go between the two by typing either "client" or "server". Both the client and server have their own set of commands.
Usage: * X Y
Returns X multiplied by Y. If X and Y are both
ints, then an int will be returned. If one of X
or Y is a float, then a float will be returned.
Usage: *= VAR F
Multiplies the environment variable VAR by the
Usage: + X Y
Returns X plus by Y. If X and Y are both ints,
then an int will be returned. If one of X or Y
is a float, then a float will be returned.
Usage: ++ STR1 STR2
Returns the string STR1 concatenated with the
Usage: += VAR X
Multiplies the environment variable VAR by X.
Note: The types of $VAR and X must agree.
Usage: == EXP1 EXP2
Returns true if the expressions EXP1 and EXP2 are
equal, otherwise returns false.
Usage: alias ALIAS_NAME CMD_STRING
Adds a new alias called ALIAS_NAME which
evaluates to the command CMD_STRING. Although an
existing alias can be replaced by a new alias, a
command cannot be replaced.
Dumps the current debug stack to standard output.
Usage: delete VAR_NAME
Deletes the environment variable. Note: VAR_NAME
must start with "home.".
Prints all of the environment variables to
Usage: echo STRING
Prints the string STRING to the console.
Usage: exec COMMAND_STR
Executes the command stored by COMMAND_STR. For
example, "exec $foo" will execute the command
string stored in the environment variable foo.
Usage: execf FILENAME
Executes all the commands in the file FILENAME.
Every line of the file should be either a valid
S-expression or a comment line (all whitespace or
starting with the character '#'). FILENAME
should be a path relative to the directory
Exits the program.
Generates an html file with documentation about
Usage: get VAR
Returns the value stored by the environment
variable VAR. Note that the dollar sign followed
by a string literal is syntactic sugar for the
get command. That is, "$VAR" is equivalent to
Usage: gprint STR
Prints the string STR to the server GUI screen.
The command "help" lists all commands in white
and aliases in pink. The command "help NAME"
prints help information about the command or
Usage: let VAR_NAME VALUE
Creates/sets the environment variable VAR_NAME to
VALUE. Note: VAR_NAME must start with "home.".
ls PATH v
The command "ls" lists all variables in the
"current working directory" (See also: cd, pwd).
The command "ls PATH" lists all variables in the
name directory PATH. The command "ls PATH v"
lists the name and values of all variables in the
name directory PATH.
Usage: map MAPNAME
map MAPNAME GAMEMODE
The command "map MAPNAME" changes the current map
to MAPNAME using the default game mode listed in
the map file. The command "map MAPNAME GAMEMODE"
changes the current map to MAPNAME using the
Usage: not BOOL
Returns the negation of the bool BOOL.
Usage: print STR
Prints the string STR to standard output.
This is an alias for the command
Usage: seq EXP_1 EXP_2 ... EXP_N
Evaluates the expressions EXP_1 through EXP_N
from left to right, returning the value that
EXP_N evaluates to. That is, this command can be
used to execute a sequence of commands. For
example, "seq (echo hello) (echo there)" will
print "hello" and then "there" to the console,
and void will be returned (because "(echo there)"
evaluates to void).
Usage: set VAR_NAME VALUE
Sets the environment variable VAR_NAME to VALUE.
Usage: toggle VAR_NAME
Equivalent to "set VAR_NAME (not (get
Usage: tostring EXP
Returns the expression EXP converted to a string.
Usage: type EXP
Returns the type of the expression EXP. For
example, "echo (type (vec 1.0 2.0 3.0))" will
print "vector" to the console.
Usage: unalias name ALIAS_NAME
The command "unalias name ALIAS_NAME" removes the
alias ALIAS_NAME The command "unalias all"
removes all aliases.
Usage: vec X Y Z
Returns the vector whose components are the