BIS fnc getServerVariable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (you get no value back with spawn)
m (template:command argument fix)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Fetch a variable saved on server. Used when you want to share variables only to specific clients to prevent large traffic. Must be run in [[Scheduler#Scheduled_Environment|scheduled environment]] because communication with server takes some time. |= Description
| Fetch a variable saved on server. Used when you want to share variables only to specific clients to prevent large traffic. Must be run in [[Scheduler#Scheduled_Environment|scheduled environment]] because communication with server takes some time. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [target, varName, default] call [[BIS_fnc_getServerVariable]] |= Syntax
| [target, varName, default] call [[BIS_fnc_getServerVariable]] |SYNTAX=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 20: Line 20:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Anything]] - Default value or saved variable|= Return value
| [[Anything]] - Default value or saved variable|RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 26: Line 26:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[getVariable]], [[setVariable]], [[allVariables]]|= See also }}
| [[getVariable]], [[setVariable]], [[allVariables]]|SEEALSO= }}





Revision as of 11:28, 7 April 2019

Hover & click on the images for description

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 run in scheduled environment because communication with server takes some time.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[target, varName, default] call BIS_fnc_getServerVariable
Parameters:
target: Namespace, Object or Group - Variable name space
varName: String - Variable name
default: Anything - Default value returned when variable is nil
Return Value:
Anything - Default value or saved variable

Examples

Example 1:
[ missionNamespace, "BIS_someVar", "defaultValue"] call 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


Notes

Bottom Section