-
Notifications
You must be signed in to change notification settings - Fork 4
Numeric and variable functions
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)
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
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
Shows the seconds that have passed since January 1st 1970 unix time.
No arguments.
Example code:
[TIME]
> 1647201195.1085777
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
Numbers n' Vars || Arrays || Strings || Control flow || Meta || # || How do I start?