BIS fnc setServerVariable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 8: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Set variable stored only on server. Clients can the download it using [[BIS_fnc_getServerVariable]]. Used when you want to share variables only to specific clients to prevent large traffic. |= Description
____________________________________________________________________________________________
 
| [namespace, varName, value] call [[BIS_fnc_setServerVariable]] |= Syntax


Description:
|p1= namespace: [[Namespace]] or [[Object]] or [[Group]] - (Optional, default [[missionNamespace]]) |= Parameter 1
Set variable stored only on server.
Clients can the download it using BIS_fnc_getServerVariable.
Used when you want to share variables only to specific clients to prevent large traffic.


Parameter(s):
|p2= varName: [[String]] - variable name |= Parameter 2
0: NAMESPACE or OBJECT or GROUP - variable name space
1: STRING - variable name
2: ANY - value


Returns:
|p3= value: [[Anything]] - variable value |= Parameter 3
BOOL
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
| [[Boolean]] - [[true]] when done |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_setServerVariable]]; --> |= Syntax
|x1= <code><nowiki>[</nowiki>[[nil]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |= Example 1


|p1= |= Parameter 1
|x2= <code><nowiki>[</nowiki>[[player]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |= Example 2
 
| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=
| [[BIS_fnc_getServerVariable]], [[publicVariableServer]], [[publicVariableClient]] |= See also
____________________________________________________________________________________________
 
| |= See also
 
}}
}}



Revision as of 08:18, 23 May 2018

Hover & click on the images for description

Description

Description:
Set variable stored only on server. Clients can the download it using BIS_fnc_getServerVariable. Used when you want to share variables only to specific clients to prevent large traffic.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[namespace, varName, value] call BIS_fnc_setServerVariable
Parameters:
namespace: Namespace or Object or Group - (Optional, default missionNamespace)
varName: String - variable name
value: Anything - variable value
Return Value:
Boolean - true when done

Examples

Example 1:
[nil, "playerHealth", damage player] call BIS_fnc_setServerVariable;
Example 2:
[player, "playerHealth", damage player] call BIS_fnc_setServerVariable;

Additional Information

See also:
BIS_fnc_getServerVariablepublicVariableServerpublicVariableClient

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section