Script für Server und Klient

Posted By: NovaTech2010

Script für Server und Klient - 07/26/15 16:11

Hallo,

ich befasse mich seit einigen Tagen mit den Multiplayerfunktionen... mein Ziel ist ein Server-Script und ein seperates Script für Klienten, jedoch scheint es da ein Problem zu geben auf das ich nicht komme.
Zwei unterschiedliche Scripte (Server + Client) können miteinander kommunizieren, sofern der Quellcode 100% übereinstimmt, ich finde das jedoch etwas komisch.

Ist es garnicht möglich ein Netzwerk aufzubauen mit unterschiedlichen Scripten?

A8 Pro Lite-C

Danke vielmals
LG - Marvin
Posted By: EpsiloN

Re: Script für Server und Klient - 07/27/15 08:59

You can make a separate client and server scripts that dont match.
Quote from the manual about session_open:
Quote:
A8.10 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.

You will have to use send_data and prepare your data by hand (no send_var or skill... laugh ) , but you will separate the client and server applications.
Posted By: NovaTech2010

Re: Script für Server und Klient - 07/27/15 14:16

Thank you so much, it is exactly what i need, merci, merci grin
© 2024 lite-C Forums