[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.GetUniqueNumber


Name GetUniqueNumber
Type Method
Summary Returns a unique number
Prototype long GetUniqueNumber();
Description

Returns a unique number in the range 0 to 2,147,483,647.

This number will be unique for this session of MUSHclient, across all worlds. You might use it to generate unique labels for one-shot timers, or other similar purposes.

Note that the number will eventually "wrap around" and thus, if you generate a lot of them (ie. 2,147,483,647 of them), they will no longer be unique.

Also note that this number generator is used internally in MUSHclient, and thus the numbers generated will not necessarily be in sequence.

Important - this number is reset for each new MUSHclient session, so these numbers are only unique per session, not indefinitely.

VBscript example
world.note world.GetUniqueNumber
Jscript example
world.note (world.GetUniqueNumber());
PerlScript example
$world->note ($world->GetUniqueNumber());
Python example
world.note (world.GetUniqueNumber)
Lua example
Note (GetUniqueNumber())
Returns A unique number in the range 0 to 2147483647 as described above.

See also ...

Function Description
CreateGUID Creates a GUID - Global Unique Identifier
GetUniqueID Creates a unique ID for general use, or for making Plugin IDs

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]