L3DT users' wiki
Large 3D terrain generator

rand

Description

Get a random integer.

Function prototype

int rand <void>

Arguments

None.

Return value

An integer random number, in the range of 0…0x7FFFF.

Example

// write random number to event log 10 times
int i
set i 0
do
  echo <zs:rand>
  incr i
while <zs:islt i 10>

… the output of which is written to the event log by echo as:

41
18467
6334
26500
19169
15724
11478
29358
26962
24464

Comments

None.

See also

 
plugins/general/zeoscript/reference/functions/rand.txt · Last modified: 2017/08/31 06:48 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki