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
(Created page with "== Syntax == <pre>onServerStart()</pre> ---- == Arguments == * ''None'' ---- == Example == The following example will print "Hello World!" when the server is started. <sour...") |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Syntax == | == Syntax == | ||
< | <source lang=squirrel> | ||
onServerStart() | |||
</source> | |||
== 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. | |||
== Related Functions == | |||
{{Scripting/Squirrel/Events/Server_Events}} | |||
[[Category:Scripting/Squirrel/Events/Server_Events]] |
Latest revision as of 21:08, 22 August 2019
Syntax
onServerStart()
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.