Opens a multiplayer session as a server. After the session has been opened, clients can connect to it through the session_connect function.
0 if the session could not be established, otherwise nonzero.
||Name of the session, or NULL for using the name of the main script. A8.10
When the name begins with an asterisk '*' character, an unprotected session is started, otherwise a protected session.
A8 C , A7 P
- This instruction can be used to switch the engine to server/client mode even if it wasn't started with the -sv command line option.
- After switching from normal to server mode, the level has to be loaded anew.
- All server dependent functions or initializations must run _after_ opening a session.
When the name begins with a '*' character, the session is unprotected. Unprotected sessions can be joined by any client, even with a different script. Protected sessions only accept clients with identical script. Script variable synchronization (send_var, send_string) or directly sending function or object pointers only works in protected sessions. In unprotected sessions, all variables and objects must be sent through send_data.
level_load("office.wmb"); // load level anew
send_string, session_connect, session_close, connection
► latest version online