RandInt: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">randInt ( lowerbound, upperbound )</syntaxhighlight> | |||
===Required Arguments=== | ===Required Arguments=== | ||
* '''lowerbound''': This is the lowest random value this function can return. | * '''lowerbound''': This is the lowest random value this function can return. | ||
* '''upperbound''': This is the highest random value this function can return. | * '''upperbound''': This is the highest random value this function can return. | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">serverChat ( "A random value between 5 and 10 is ", randInt ( 5, 10 ) )</syntaxhighlight> |
Revision as of 03:26, 18 May 2006
Description
This function returns a random integer value between a specified minimum and maximum value.
Syntax
randInt ( lowerbound, upperbound )
Required Arguments
- lowerbound: This is the lowest random value this function can return.
- upperbound: This is the highest random value this function can return.
Example
serverChat ( "A random value between 5 and 10 is ", randInt ( 5, 10 ) )