Argument (Expression) — Skript

Addon: Skript · Category: Expression · Since: 1.0, 2.7 (support for command events)

Syntax

[the] last arg[ument]

Description

Usable in script commands and command events. Holds the value of an argument given to the command, e.g. if the command "/tell <player> <text>" is used like "/tell Njol Hello Njol!" argument 1 is the player named "Njol" and argument 2 is "Hello Njol!". One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'. Please note that specifying the argument type is only supported in script commands.

Examples

give the item-argument to the player-argument
damage the player-argument by the number-argument
give a diamond pickaxe to the argument
add argument 1 to argument 2
heal the last argument

View source