Squirrel/Server/Functions/Utils/RandomString

From Liberty Unleashed Wiki
Jump to: navigation, search
This function currently does not work.


This function generates a random string based on two integers ( minlength and maxlength )

Contents

Syntax

  1. RandomString( int minlength, int maxlength )

Arguments

  • minlength - An integer which sets the minimum length of the string.
  • maxlength - An integer which sets the maximum length of the string.

Example

  1. function onConsoleInput( cmd, text )
  2. {
  3. if( cmd == "randomstring" )
  4. {
  5. local string = RandomString( 5, 50 );
  6. print("Generated string: " + string );
  7. }
  8. }

Notes

The function print and the event onConsoleInput were used in this example. More info about them on their corresponding page.

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox