server_name

These predefined strings hold the name and the first IP address of the server in a multiplayer game. On a client the strings are empty. They can be used to display the information the clients have to enter in the IP field in order to connect.

Type:

STRING*, read-only

Remarks:

For connecting on a local network the server name can be used; for connecting over the internet the IP address or the domain name must be used.

Example:

...
while (connection == 0) { wait(1); }
str_cpy(temp_str,server_name);
str_cat(temp_str," has the IP: ");
str_cat(temp_str,server_IP);
scroll_message(temp_str);
...

See also:

level_name, app_name, level_load, player_name, -pl, server_ip, session_name