BIS fnc getServerVariable: Difference between revisions
Jump to navigation
Jump to search
Sarogahtyp (talk | contribs) mNo edit summary |
m (pf) |
||
Line 1: | Line 1: | ||
{{Function|= Comments | {{Function|= Comments | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | arma 3 |= Game name | ||
|1.00|= Game version | |1.00|= Game version | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Fetch a variable saved on server. Used when you want to share variables only to specific clients to prevent large traffic. Must be [[spawn|spawned]] because communication with server takes some time. |= Description | ||
____________________________________________________________________________________________ | |||
| [target, varName, default] spawn [[BIS_fnc_getServerVariable]] |= Syntax | |||
____________________________________________________________________________________________ | |||
|p1= target: [[Namespace]], [[Object]] or [[Group]] - Variable name space|= Parameter 1 | |||
|p2= varName: [[String]] - Variable name|= Parameter 2 | |||
|p3= varName: [[Anything]] - Default value returned when variable is [[nil]]|= Parameter 3 | |||
____________________________________________________________________________________________ | |||
|exec= spawn |= Execution | |||
____________________________________________________________________________________________ | |||
| [[Anything]] - Default value or saved variable|= Return value | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| < | |x1= <code>[ [[missionNamespace]], "BIS_someVar", "defaultValue"] [[spawn]] [[BIS_fnc_getServerVariable]];</code> |= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[getVariable]], [[setVariable]], [[allVariables]]|= See also }} | ||
<h3 style="display:none">Notes</h3> | <h3 style="display:none">Notes</h3> |
Revision as of 18:52, 2 June 2018
Description
- Description:
- Fetch a variable saved on server. Used when you want to share variables only to specific clients to prevent large traffic. Must be spawned because communication with server takes some time.
- Execution:
- spawn
- Groups:
- Uncategorised
Syntax
- Syntax:
- [target, varName, default] spawn BIS_fnc_getServerVariable
- Parameters:
- target: Namespace, Object or Group - Variable name space
- varName: String - Variable name
- varName: Anything - Default value returned when variable is nil
- Return Value:
- Anything - Default value or saved variable
Examples
- Example 1:
[ missionNamespace, "BIS_someVar", "defaultValue"] spawn BIS_fnc_getServerVariable;
Additional Information
- See also:
- getVariablesetVariableallVariables
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