getDescription: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>")
m (Some wiki formatting)
 
(6 intermediate revisions by the same user not shown)
Line 12: Line 12:
|p1= unit: [[Object]]
|p1= unit: [[Object]]


|r1= [[Array]] of [[String]]s to format {{hl|[unit'''Class''', uniform'''Name''', vest'''Name''', backpack'''Class''']}}
|r1= [[Array]] of [[String]]s format {{hl|[unit'''Class''', uniform'''Name''', vest'''Name''', backpack'''Class''']}}


|x1= <code>[[getDescription]] [[player]]; {{cc|(UAV Operator)}}
|x1= <sqf>
{{cc|returns ["B_soldier_UAV_F", "Combat Fatigues (MTP)", "Carrier Special Rig (Green)", "B_UAV_01_backpack_F"]}}</code>
getDescription player; // UAV Operator
// returns ["B_soldier_UAV_F", "Combat Fatigues (MTP)", "Carrier Special Rig (Green)", "B_UAV_01_backpack_F"]
</sqf>


|x2= <code>getDescription objNull; {{cc|returns ["ERROR", "ERROR", "ERROR", "ERROR"]}}</code>
|x2= <sqf>getDescription objNull; // returns ["ERROR", "ERROR", "ERROR", "ERROR"]</sqf>


|seealso= [[roleDescription]] [[vehicleVarName]]
|seealso= [[roleDescription]] [[vehicleVarName]]
}}
}}


<dl class="command_description">
{{Note
 
|user= Druid
<dt class="note">[[User:Druid|Druid]]</dt>
|timestamp= 20130319155400
<dd class="note">
|text= Return value fixed in revision 0.51.103185.
Return value fixed in revision 0.51.103185.
}}
 
</dl>

Latest revision as of 19:13, 12 May 2023

Hover & click on the images for description

Description

Description:
Returns the string representation of unit as an four slots array.
Groups:
Object Manipulation

Syntax

Syntax:
getDescription unit
Parameters:
unit: Object
Return Value:
Array of Strings format [unitClass, uniformName, vestName, backpackClass]

Examples

Example 1:
getDescription player; // UAV Operator // returns ["B_soldier_UAV_F", "Combat Fatigues (MTP)", "Carrier Special Rig (Green)", "B_UAV_01_backpack_F"]
Example 2:
getDescription objNull; // returns ["ERROR", "ERROR", "ERROR", "ERROR"]

Additional Information

See also:
roleDescription vehicleVarName

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
Druid - c
Posted on Mar 19, 2013 - 15:54 (UTC)
Return value fixed in revision 0.51.103185.