Arma 3 Scripting

Command in System

connectToServer

Also available as Markdown and JSON, or read the original wiki page.

Description

Connects the client to the provided server.

Note

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:

Returns: Nothing

Examples

Example 1

connectToServer ["192.168.0.2", 2302, "test"];

Example 2

connectToServer ["publicserver.mydomain.com", 2302, ""];

See also

serverCommand · getSteamFriendsServers