Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When working with the server scripts, you can use the independent methods described below.

alert(message)


The method outputs a string to the Info block after the server script execution. If there are multiple text output commands used, their results are combined.

Parameter(s):

NameTypeMandatoryDefault value
messageStringYN

Return:

Type

Description

VoidThis method does not return a value.

Example:

Code Block
languagejs
themeEclipse
titlealert()
linenumberstrue
alert('Message');
// Message

echo(messages)


The method outputs one or more string to the Info block after the server script execution.

Parameter(s):

NameTypeMandatoryDefault value
messagesStringYN

Return:

Type

Description

VoidThis method does not return a value.

Example:

Code Block
languagejs
themeEclipse
titleecho()
linenumberstrue
echo('Message');
// Message

json(value)


The method outputs a string containing the JSON representation of the specified value to the Info block under the server script after the execution.

Parameter(s):

NameTypeMandatoryDefault value
valueAnyYN

Return:

Type

Description

VoidThis method does not return a value.

Example:

Code Block
languagejs
themeEclipse
titlejson()
linenumberstrue
json('{"key":"value"}')
// "{\"key\":\"value\"}" 

print(message)


The method is used to display a string in the Info block after the server script execution.

Parameter(s):

NameTypeMandatoryDefault value
messageAnyYN

Return:

Type

Description

IntegerReturns the number of characters in the transmitted message.

Example:

Code Block
languagejs
themeEclipse
titleprint()
linenumberstrue
print('Message')
// Message

print_r(value)


The method outputs human readable information about the variable in the server script. If a string, integer, or floating point number is given, the value itself will be printed. If an array is given, the values will be presented in a format that shows keys and elements. Similar designations are used for objects.

Parameter(s):

NameTypeMandatoryDefault value
valueAnyYN

Return:

Type

Description

Void

This method does not return a value.

Example:

Code Block
languagejs
themeEclipse
titleprint_r()
linenumberstrue
print_r({key: 'value'});
//V8Object Object
//(
//    [key] => value
//) 

sleep(seconds)


The method is used to delay the execution of a server script.

Parameter(s):

NameTypeMandatoryDefaultDefault value
secondsIntegerYN

Return:

Type

Description

VoidThis method does not return a value.

Example:

Code Block
languagejs
themeEclipse
titlesleep()
linenumberstrue
ss.info(new SimpleDateTime().getValue());
sleep(10);
ss.info(new SimpleDateTime().getValue());
// Info: 2022-09-28 09:46:59
// Info: 2022-09-28 09:47:09

If the delay exceeds the server script execution timeout, use the ss.eventQueueScheduled() delayed event to execute the delayed part of the script.

var_dump(value)


The method accepts a set of parameters of different types, the information about each of them is displayed in the Info block after the server script execution.

Parameter(s):

NameTypeMandatoryDefault value
valueanyYN

Return:

Type

Description

VoidThis method does not return a value.

Example:

Code Block
languagejs
themeEclipse
titlevar_dump()
linenumberstrue
var_dump({key: 'value'});
//object(Object)#835396 (1) {
//  ["key"] =>
//  string(5) "value"
//} 


Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse