Description
Connects the client to the provided server.
Note
- only works on the Main Menu.
- must be executed from UI context, such as onButtonDown or similar events (see User Interface Event Handlers).
Note
Since Arma 3 v2.20: If port is 0, the IP will be resolved as a SRV DNS Record.
["domain.com", 0, "password"] will be resolved as "_arma3._udp.domain.com".
Only the first found record will be used, there is no support for multiple records with priority/weights.
Syntax
connectToServer [ip, port, password]
Parameters:
ip: String - IP in https://en.wikipedia.org/wiki/IPv4 format or Arma 3 v2.20 domain nameport: Numberpassword: String - "" if no password
Returns: Nothing
Examples
Example 1
connectToServer ["192.168.0.2", 2302, "test"];
Example 2
connectToServer ["publicserver.mydomain.com", 2302, ""];