publicVariableServer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Some wiki formatting)
(45 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2oa |= Game name
|game1= arma2oa
|version1= 1.62


|1.62|= Game version
|game2= tkoh
____________________________________________________________________________________________
|version2= 1.00


| Send the variable value to the server - same limitations regarding variable type as [[publicVariable#Description|publicVariable]]. <br><br>
|game3= arma3
{{Feature arma3|In Arma 3 it is possible to broadcast [[nil]] value}}|DESCRIPTION=
|version3= 0.50


____________________________________________________________________________________________
|gr1= Multiplayer


| '''publicVariableServer''' varName |SYNTAX=
|gr2= Variables


|p1= varName: [[String]] |PARAMETER1=
|descr= Send the variable value to the server - same limitations regarding variable type as [[publicVariable#Description|publicVariable]].
{{Feature|arma3|In {{arma3}} it is possible to broadcast the [[nil]] value.}}


| [[Nothing]] |RETURNVALUE=
|s1= [[publicVariableServer]] varName
____________________________________________________________________________________________
 
|x1= <code>'''publicVariableServer''' "CTFscoreOne";</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[publicVariable]], [[publicVariableClient]], [[addPublicVariableEventHandler]] |SEEALSO=
|p1= varName: [[String]]


}}
|r1= [[Nothing]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>publicVariableServer "CTFscoreOne";</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on 24 Aug, 2012
|seealso= [[publicVariable]] [[publicVariableClient]] [[addPublicVariableEventHandler]]
<dt class="note">[[User:Kylania|Kylania]]<dd class="note">
}}
[[publicVariableServer]] (run on client)<BR>
[[publicVariableClient]] (run on server)<BR>


Publishers the variable (name as STRING) to the server only. Useful when you want to synchronize a variable with the server but not any other clients. - [http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795 Rocket]
{{Note
|user= Kyliana
|timestamp= 20120824020600
|text=
* [[publicVariableServer]] (run on client)
* [[publicVariableClient]] (run on server)


<!-- Note Section END -->
Publishes the variable (name as [[String]]) to the server only.
</dl>
Useful when you want to synchronise a variable with the server but not any other clients. - {{Link|link= http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795|text= Rocket}}
 
}}
<h3 style="display:none">Bottom Section</h3>
 
[[Category:ArmA 2 OA: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Multiplayer|{{uc:{{PAGENAME}}}}]]

Revision as of 00:30, 26 March 2024

Hover & click on the images for description

Description

Description:
Send the variable value to the server - same limitations regarding variable type as publicVariable.
Arma 3
In Arma 3 it is possible to broadcast the nil value.
Groups:
MultiplayerVariables

Syntax

Syntax:
publicVariableServer varName
Parameters:
varName: String
Return Value:
Nothing

Examples

Example 1:
publicVariableServer "CTFscoreOne";

Additional Information

See also:
publicVariable publicVariableClient addPublicVariableEventHandler

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
Kyliana - c
Posted on Aug 24, 2012 - 02:06 (UTC)
Publishes the variable (name as String) to the server only. Useful when you want to synchronise a variable with the server but not any other clients. - Rocket