GetServerHttpPort: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
This function retrieves the server's | This function retrieves the server's HTTP port. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
int getServerHttpPort ( | int getServerHttpPort ( ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Returns=== | ===Returns=== | ||
An integer corresponding to the server's | An integer corresponding to the server's HTTP port. | ||
==Example== | ==Example== | ||
Line 17: | Line 17: | ||
function(player, command) | function(player, command) | ||
outputChatBox("HTTP port of this server is: " .. getServerHttpPort( | outputChatBox("HTTP port of this server is: " .. getServerHttpPort(), player, 0, 255, 0) | ||
end) | end) |
Latest revision as of 09:45, 21 June 2019
This function retrieves the server's HTTP port.
Syntax
int getServerHttpPort ( )
Returns
An integer corresponding to the server's HTTP port.
Example
This example outputs server's HTTP port to the chat box when player uses command getHttpPort
addCommandHandler("getHttpPort", function(player, command) outputChatBox("HTTP port of this server is: " .. getServerHttpPort(), player, 0, 255, 0) end)
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown