set: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
[[Category:Scripting Commands|SET]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|SET]]
____________________________________________________________________________________________
[[Category:Scripting Commands ArmA|SET]]


| ofpr |= Game name


<h2 style="color:#000066">'''''array'' set ''element'''''</h2>
|1.75|= Game version
____________________________________________________________________________________________


| Format of element is [index, value]. Changes an element of given array. If element does not exist, [[resize]] index+1 is called to create it. |= Description
____________________________________________________________________________________________


'''Operand types:'''
| array '''set''' element |= Syntax


'''array:''' [[Array]]
|p1= array: [[Array]] |= Parameter 1


'''element:''' [[Array]]
|p2= element: [[Array]] |= Parameter 2


'''Type of returned value:'''
| [[Nothing]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>arrayOne set [0, "Hello"]</pre> |= Example 1
____________________________________________________________________________________________


[[Nothing]]
|  |= See also


'''Compatibility:'''
}}


Added in version '''1.75'''
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Description:'''
<!-- Note Section END -->
</dl>


Format of element is '''''[index, value]'''''.
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|SET]]
Changes an '''element''' of given '''array'''.
[[Category:Scripting Commands OFP 1.96|SET]]
 
[[Category:Scripting Commands ArmA|SET]]
If '''element''' does not exist, [[resize]] index+1 is called to create it.
 
 
'''Example:'''
 
arrayOne '''set''' [0, "Hello"]

Revision as of 23:03, 1 August 2006

Hover & click on the images for description

Description

Description:
Format of element is [index, value]. Changes an element of given array. If element does not exist, resize index+1 is called to create it.
Groups:
Uncategorised

Syntax

Syntax:
array set element
Parameters:
array: Array
element: Array
Return Value:
Nothing

Examples

Example 1:
arrayOne set [0, "Hello"]

Additional Information

See also:
See also needed

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