What it does
NetworkClientUserData writes to a Multiplayer object: it sets rather than reads. It takes iNetID (an integer), client (an integer), index (an integer) and value (an integer), and returns nothing. That is the first of 2 forms. iNetID is the id of a Net object, obtained elsewhere in the Multiplayer family.
Syntax
1
NetworkClientUserData(iNetID integer, client integer, index integer, value integer)2
NetworkClientUserData(iNetID integer, client integer, index integer) → integerParameters
| Name | Type | In forms |
|---|---|---|
| iNetID | integer | all |
| client | integer | all |
| index | integer | all |
| value | integer | 1 |
What each form returns
| 1 | NetworkClientUserData(net, 1, 1, 1) | nothing |
| 2 | NetworkClientUserData(net, 1, 1) | integer |
Example · generated
Form 1, you choose the id yourself
net = CreateNetworkMessage()NetworkClientUserData(net, 1, 1, 1)DO Sync()LOOPForm 2, the command hands back the id
net = CreateNetworkMessage()DO Print(NetworkClientUserData(net, 1, 1)) Sync()LOOPCreateNetworkMessage is there to give the call something to act on; NetworkClientUserData is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.