getServerPort
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function retrieves the server's port.
Syntax
int getServerPort ( )Returns
An integer corresponding to the server's port.
- int: value
Code Examples
shared
This example Sends out the serverPort when you type: /serverport
function outputServerPort ( ) local serverPort = getServerPort() outputChatBox (" Server Port: "..serverPort.." ") --Output Serverport in ChatboxendaddCommandHandler ( "serverport", outputServerPort ) --add the command Handler