This is an old revision of the document!
ACS_SendString(int scriptnum, str s)
ACS_NamedSendString(str scriptname, str s)
These functions will launch the specified clientside script and send the string to it. For example:
ACS_SendString(123, "Hello there");
ACS_NamedSendString("myscript", "A test string");
Maximum string size is unlimited, but the larger it is, the more the server will lag while sending it.
Test your mods on a server (this is recommended for many other reasons too).
To receive a string, the receiving script must be like this:
script 123 (int a, int b, int c, int d) CLIENTSIDE
{
if (!ReceiveString(a, b, c, d))
terminate;
// Insert your code here. The string can now be retrieved using GetReceivedString().
Log(s:"Received string: ", s:GetReceivedString());
}
Use GetReceivedString() to retrieve the string that has just been received.