Skip to content

Server Functions getSettings

DizzasTeR edited this page Nov 5, 2020 · 2 revisions

getSettings

Returns server's settings

Table Server.getSettings()

Parameters

  • None

Returns

Table - A table with following:

{
["maxPlayers"]          = MAX_PLAYERS(int),
["serverPassword"]      = SERVER_PASSWORD(string),
["serverName"]          = SERVER_NAME(string),
["port"]                = SERVER_PORT(int),
["flags"]               = SERVER_FLAGS(int)
}

Note: Hidden Handler Var

When a timer callback/handler is executed, a hidden thisTimer variable is passed which references the current Timer instance being executed. This can be used to neatly deal with timers which aren't stored in a variable. Check Timer.destroy page example to see how its used.


Example

Timer.create(function(myNum, myMsg)
    Logger.info("["..myNum.."] -> "..myMsg) 
end, 1000, 1, 100, "My Message")

Clone this wiki locally