Skip to content

Numeric and variable functions

Inferno edited this page Jan 21, 2023 · 13 revisions

define

Sets the value of a variable. Does not save between uses of a tag, but does save during execution.

[DEFINE (variable name: string) (value: any)]

Example code:

[DEFINE variable 9002]
> (no output)

randint

Gives a random integer between the two integers given, inclusive for minimum and exclusive for maximum.

[RANDINT (minimum: integer) (maximum: integer)]

Example code:

[RANDINT 1 10]
> 7

random

Gives a random number between the two values given. Can be inclusive or not depending on floating-point randomness.

[RANDOM (minimum: number) (maximum: number)]

Example code:

[RANDOM 1 10]
> 4.659192591259877

time

Shows the seconds that have passed since January 1st 1970 unix time.

No arguments.

Example code:

[TIME]
> 1647201195.1085777

var

Gets a defined variable.
Keep in mind this must be done in the same program, as it is not a global variable. Information about global variables can be found in Metafunctions.

[VAR (variable name: string)]

Example code:

[VAR variable]
> 9002
Clone this wiki locally