OnServerStart: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
== Syntax ==  | == Syntax ==  | ||
<  | <source lang=squirrel>  | ||
onServerStart()  | |||
</source>  | |||
== Arguments ==  | == Arguments ==  | ||
* ''None''  | * ''None''  | ||
== Example ==  | == Example ==  | ||
The following example will print "Hello World!" when the server is started.  | The following example will print "Hello World!" when the server is started.  | ||
<source lang=squirrel>  | <source lang=squirrel>  | ||
function onServerStart()  | function onServerStart() {  | ||
{  |   print( "Hello World!" );  | ||
print( "Hello World!" );  | |||
}  | }  | ||
</source>  | </source>  | ||
== Notes ==  | == Notes ==  | ||
Function print() was used in this example.The print() function outputs a formatted string on the console.  | Function print() was used in this example.The print() function outputs a formatted string on the console.  | ||
== Related Functions ==  | == Related Functions ==  | ||
{{Scripting/Squirrel/Events/Server_Events}}  | {{Scripting/Squirrel/Events/Server_Events}}  | ||
[[Category:Scripting/Squirrel/Events/Server_Events]]  | [[Category:Scripting/Squirrel/Events/Server_Events]]  | ||
Revision as of 10:27, 26 April 2019
Syntax
onServerStart()Arguments
- None
 
Example
The following example will print "Hello World!" when the server is started.
function onServerStart() {
  print( "Hello World!" );
}Notes
Function print() was used in this example.The print() function outputs a formatted string on the console.