BIS fnc setServerVariable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling)
m (template:command argument fix)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| 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
| 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
| [namespace, varName, value] call [[BIS_fnc_setServerVariable]] |SYNTAX=


|p1= namespace: [[Namespace]] or [[Object]] or [[Group]] - (Optional, default [[missionNamespace]]) |= Parameter 1
|p1= namespace: [[Namespace]] or [[Object]] or [[Group]] - (Optional, default [[missionNamespace]]) |PARAMETER1=


|p2= varName: [[String]] - variable name |= Parameter 2
|p2= varName: [[String]] - variable name |PARAMETER2=


|p3= value: [[Anything]] - variable value |= Parameter 3
|p3= value: [[Anything]] - variable value |PARAMETER3=


| [[Boolean]] - [[true]] when done |= Return value
| [[Boolean]] - [[true]] when done |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


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


|x2= <code><nowiki>[</nowiki>[[player]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |= Example 2
|x2= <code><nowiki>[</nowiki>[[player]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[BIS_fnc_getServerVariable]], [[publicVariableServer]], [[publicVariableClient]] |= See also
| [[BIS_fnc_getServerVariable]], [[publicVariableServer]], [[publicVariableClient]] |SEEALSO=
}}
}}



Revision as of 14:33, 7 April 2019

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