Skip to content

publicVariableServer

ffredyk edited this page Jul 23, 2026 · 1 revision

publicVariableServer

Category

Multiplayer

Arity

UnarypublicVariableServer "<variableName>".

publicVariableServer <string>   // quoted variable name

Description

Sends the value of a global variable to the server only (not to other clients). The variable name is passed as a string. Useful for clients sending data to the server without broadcasting to everyone.

Placeholder/stub — full networking implementation is the host's responsibility.

How It Works

Fires the host's public variable event targeted at the server only. More efficient than publicVariable when only the server needs the update.

Usage

// Client sends request to server
_playerAction = "ready";
publicVariableServer "_playerAction";

// Client reports position to server
_clientPos = [1234, 5678, 0];
publicVariableServer "_clientPos";

Thread Safety

Depends on host implementation.

See Also

SQ# Wiki

Home

Engine Docs

Migration

Commands

Value Constructors

Arithmetic

Comparison

Logic

Array

String

Math

Random

Type & Introspection

HashMap

Code Execution

Concurrency

Scheduler

Thread Safety

Error

Output

Time

Multiplayer

Compiler

Clone this wiki locally