element.setData: Difference between revisions

no edit summary
No edit summary
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = shared
|name = setData
|side = shared
|type = method
|type = method
|class = Element
|class = Element
|name = setData
|games = iii vc sa iv
|parameters = string dataName, var theData, bool syncWithClients
|desc = set a value for an element, referenced by a key.<br>
|parameter1 = string dataName The string name of the data for the element.
The data will be sent to all clients when streaming in, so do not use element.setData() to store sensitive data like passwords.
|parameter2 = var theData The data for the element, which is referenced by dataName.
|arg1 = string dataName The string name of the data for the element.
|parameter3 = bool syncWithClients Whether to sync the data with all clients.
|arg2 = var theData The data for the element, which is referenced by dataName.
|returnTypes = void
|arg3 = bool syncWithClientsNow Whether the data is sent to clients immediately.<br>Note that all element data will be sent to a client when the element streams in.<br>This argument only applies when the method is used server-side.
|returnInfo = void
|return = void void
|returnFail1 = void
|freturn = void
|usage = sets info, referenced by name
|note = The third arg (syncWithClients) is not available client side.
|notes = The third arg (syncWithClients) is not available client side.
}}
}}
6,865

edits