Difference between revisions of "Rand"
From Hercules Wiki
Dastgirpojee (Talk | contribs) (Created page with "Category:Script_Command ==Syntax== * rand(<number>{,<number>}); ==Description== This function returns a number, randomly positioned between 0 and the number you speci...") |
Dastgirpojee (Talk | contribs) (→Examples) |
||
Line 7: | Line 7: | ||
two. | two. | ||
==Examples== | ==Examples== | ||
− | + | [[set]] .number,rand(10); // Gives Output between 0 to 10 (0,1,2,3,4,5,6,7,8,9,10) | |
− | + | [[set]] .number,rand(2,10); // Gives Output between 2 to 10 (2,3,4,5,6,7,8,9,10) | |
− | + | ||
− | + |
Latest revision as of 05:31, 9 June 2013
Syntax
- rand(<number>{,<number>});
Description
This function returns a number, randomly positioned between 0 and the number you specify (if you only specify one) and the two numbers you specify if you give it two.
Examples
set .number,rand(10); // Gives Output between 0 to 10 (0,1,2,3,4,5,6,7,8,9,10) set .number,rand(2,10); // Gives Output between 2 to 10 (2,3,4,5,6,7,8,9,10)