BIS fnc inventoryExists: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Inventory(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
Lou Montana (talk | contribs) 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 | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1 = Inventory | |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. | | Check if loadout with given name exists. | ||
| [source, name] call [[BIS_fnc_inventoryExists]] | | [source, name] call [[BIS_fnc_inventoryExists]] | ||
|p1= source: [[Namespace]], [[Group]] or [[Object]] - (Optional, default [[missionNamespace]]) loadout location | |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 | | [[Boolean]] - [[true]] if found, [[false]] otherwise | ||
|x1= <code>[[private]] _hasSuperLoadout = [<nowiki/>[[missionNamespace]], "mySuperLoadout"] [[call]] [[BIS_fnc_inventoryExists]];</code> | |x1= <code>[[private]] _hasSuperLoadout = [<nowiki/>[[missionNamespace]], "mySuperLoadout"] [[call]] [[BIS_fnc_inventoryExists]];</code> | ||
| [[setUnitLoadout]] [[getUnitLoadout]] [[BIS_fnc_saveInventory]] [[BIS_fnc_deleteInventory]] [[BIS_fnc_loadInventory]] | | [[setUnitLoadout]] [[getUnitLoadout]] [[BIS_fnc_saveInventory]] [[BIS_fnc_deleteInventory]] [[BIS_fnc_loadInventory]] | ||
}} | }} |
Revision as of 23:07, 17 January 2021
Description
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