BIS fnc inventoryExists: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Inventory(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| arma3 |Game name=
| arma3


|1.00|Game version=
|1.00


|gr1 = Inventory |GROUP1=
|gr1 = Inventory


<!---|arg= local |Multiplayer Arguments=--->
<!---|arg= local |Multiplayer Arguments=--->
Line 11: Line 11:
<!---|eff= local |Multiplayer Effects=--->
<!---|eff= local |Multiplayer Effects=--->


| Check if loadout with given name exists. |Description=
| Check if loadout with given name exists.


| [source, name] call [[BIS_fnc_inventoryExists]] |Syntax=
| [source, name] call [[BIS_fnc_inventoryExists]]


|p1= source: [[Namespace]], [[Group]] or [[Object]] - (Optional, default [[missionNamespace]]) loadout location |Parameter 1=
|p1= source: [[Namespace]], [[Group]] or [[Object]] - (Optional, default [[missionNamespace]]) loadout location


|p2= name: [[String]] - (Optional, default "")
|p2= name: [[String]] - (Optional, default "")


| [[Boolean]] - [[true]] if found, [[false]] otherwise |Return value=
| [[Boolean]] - [[true]] if found, [[false]] otherwise


|x1= <code>[[private]] _hasSuperLoadout = [<nowiki/>[[missionNamespace]], "mySuperLoadout"] [[call]] [[BIS_fnc_inventoryExists]];</code> |Example 1=
|x1= <code>[[private]] _hasSuperLoadout = [<nowiki/>[[missionNamespace]], "mySuperLoadout"] [[call]] [[BIS_fnc_inventoryExists]];</code>


| [[setUnitLoadout]] [[getUnitLoadout]] [[BIS_fnc_saveInventory]] [[BIS_fnc_deleteInventory]] [[BIS_fnc_loadInventory]] |See also=
| [[setUnitLoadout]] [[getUnitLoadout]] [[BIS_fnc_saveInventory]] [[BIS_fnc_deleteInventory]] [[BIS_fnc_loadInventory]]
}}
}}

Revision as of 00:07, 18 January 2021

Hover & click on the images for description

Description

Description:
Check if loadout with given name exists.
Execution:
call
Groups:
Inventory

Syntax

Syntax:
[source, name] call BIS_fnc_inventoryExists
Parameters:
source: Namespace, Group or Object - (Optional, default missionNamespace) loadout location
name: String - (Optional, default "")
Return Value:
Boolean - true if found, false otherwise

Examples

Example 1:
private _hasSuperLoadout = [missionNamespace, "mySuperLoadout"] call BIS_fnc_inventoryExists;

Additional Information

See also:
setUnitLoadout getUnitLoadout BIS_fnc_saveInventory BIS_fnc_deleteInventory BIS_fnc_loadInventory

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