GetServerName: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Added template, fixed typo) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | |||
This function returns a string containing the server's name. | This function returns a string containing the server's name. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string getServerName ( ) | string getServerName ( ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Returns=== | ===Returns=== | ||
Line 15: | Line 12: | ||
==Example== | ==Example== | ||
This example creates a console command that outputs the server's name | This example creates a console command that outputs the server's name to the chatbox. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function outputServerName ( ) | function outputServerName ( ) |
Revision as of 15:22, 13 August 2007
This function returns a string containing the server's name.
Syntax
string getServerName ( )
Returns
A string containing the server's name.
Example
This example creates a console command that outputs the server's name to the chatbox.
function outputServerName ( ) outputChatBox ( getServerName( ) ) end -- Add console command 'getServerName' addCommandHandler ( "getServerName", outputServerName )
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown