BIS fnc getServerVariable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (call instead of spawn)
(execution, typo)
Line 15: Line 15:
|p1= target: [[Namespace]], [[Object]] or [[Group]] - Variable name space|= Parameter 1
|p1= target: [[Namespace]], [[Object]] or [[Group]] - Variable name space|= Parameter 1
|p2= varName: [[String]] - Variable name|= Parameter 2
|p2= varName: [[String]] - Variable name|= Parameter 2
|p3= varName: [[Anything]] - Default value returned when variable is [[nil]]|= Parameter 3
|p3= default: [[Anything]] - Default value returned when variable is [[nil]]|= Parameter 3
____________________________________________________________________________________________
____________________________________________________________________________________________
|exec= spawn |= Execution
|exec= spawn or call |= Execution
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 00:16, 7 January 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:
spawn or 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