$random[]

Returns a random number between min and max.

Warning

$random[] never returns the ‘max’ value, as it’s right side exclusive range. Basically, to get a random number between 1 and 5; you’d put 6 as the Max instead of 5 i.e $random[1;6] will return: 1, 2, 3, 4, 5.

Syntax

$random[Min;Max]

Parameters

  • Min (Type: Integer, Float || Flag: Required): The minimum value.
  • Max (Type: Integer, Float || Flag: Required): The maximum value.

Failure

The Max value cannot be greater than or equal to the Min value.

  • Max <= Min
  • Max > Min

Example

$nomention
The random number is **$random[1;21]**
!example The random number is 16