diff --git a/addons/arsenal/functions/fnc_addRightPanelButton.sqf b/addons/arsenal/functions/fnc_addRightPanelButton.sqf index 7d4ecd0d98..332f2453aa 100644 --- a/addons/arsenal/functions/fnc_addRightPanelButton.sqf +++ b/addons/arsenal/functions/fnc_addRightPanelButton.sqf @@ -7,9 +7,9 @@ * * Arguments: * 0: items only misc items - * 1: tooltip (Optional) - * 2: picture path (Optional) - * 3: override a specific button (0-9) (Optional) + * 1: tooltip (default: "") + * 2: picture path (default: QPATHTOF(data\iconCustom.paa)) + * 3: override a specific button (0-9) (default: -1) * * Return Value: * successful: number of the slot (0-9); error: -1 diff --git a/addons/common/functions/fnc_getFiremodeIndex.sqf b/addons/common/functions/fnc_getFiremodeIndex.sqf index 20c04bc69f..647b444dc3 100644 --- a/addons/common/functions/fnc_getFiremodeIndex.sqf +++ b/addons/common/functions/fnc_getFiremodeIndex.sqf @@ -5,8 +5,8 @@ * * Arguments: * 0: Unit - * 1: Muzzle (Optional) - * 2: Firemode (Optional) + * 1: Muzzle (default: current weapon muzzle) + * 2: Firemode (default: current weapon fire mode) * * Return Value: * Weapon/Mode index @@ -18,14 +18,14 @@ */ params ["_unit"]; -(weaponState _unit) params ["", "_currentMuzzle", "_currentFiremode"]; +(weaponState _unit) params ["", "_currentMuzzle", "_currentFiremode"]; params ["", ["_muzzle", _currentMuzzle], ["_firemode", _currentFireMode]]; -private _weapons = _unit weaponsInfo [_muzzle, false]; -private _index = -1; +private _weapons = _unit weaponsInfo [_muzzle, false]; +private _index = -1; { _x params ["_xIndex", "", "", "", "_xFiremode"]; - if (_xFiremode == _firemode) exitWith { _index = _xIndex; }; + if (_xFiremode == _firemode) exitWith { _index = _xIndex; }; } forEach _weapons; _index diff --git a/addons/common/functions/fnc_numberToDigits.sqf b/addons/common/functions/fnc_numberToDigits.sqf index e4da7a6b43..d6a0249f86 100644 --- a/addons/common/functions/fnc_numberToDigits.sqf +++ b/addons/common/functions/fnc_numberToDigits.sqf @@ -5,7 +5,7 @@ * * Arguments: * 0: Number to 'digitize' - * 1: Set the minimal length of the returned array. Useful for getting left hand zeroes. (optional) + * 1: Set the minimal length of the returned array. Useful for getting left hand zeroes. (default: 1) * * Return Value: * Digits. The maximum count is six digits. @@ -16,7 +16,7 @@ * Public: Yes */ -params ["_number", "_minLength"]; +params ["_number", ["_minLength", 1]]; _number = [_number min 999999, _minLength] call CBA_fnc_formatNumber; diff --git a/addons/interact_menu/functions/fnc_createAction.sqf b/addons/interact_menu/functions/fnc_createAction.sqf index 428f8a26d7..07aa6d5fee 100644 --- a/addons/interact_menu/functions/fnc_createAction.sqf +++ b/addons/interact_menu/functions/fnc_createAction.sqf @@ -10,12 +10,12 @@ * 2: Icon file path or Array of icon file path and hex color ("" for default icon) * 3: Statement * 4: Condition - * 5: Insert children code (Optional) - * 6: Action parameters (Optional) - * 7: Position (Position array, Position code or Selection Name) , or (Optional) - * 8: Distance (Optional) - * 9: Other parameters [showDisabled,enableInside,canCollapse,runOnHover,doNotCheckLOS] (Optional) - * 10: Modifier function (Optional) + * 5: Insert children code (default: {}) + * 6: Action parameters (default: []) + * 7: Position (Position array, Position code or Selection Name) , or (default: {[0, 0, 0]}) + * 8: Distance (default: 2) + * 9: Other parameters [showDisabled,enableInside,canCollapse,runOnHover,doNotCheckLOS] (default: all false) + * 10: Modifier function (default: {}) * * Return Value: * Action diff --git a/addons/rearm/functions/fnc_disable.sqf b/addons/rearm/functions/fnc_disable.sqf index ee99746916..051d2fc9c9 100644 --- a/addons/rearm/functions/fnc_disable.sqf +++ b/addons/rearm/functions/fnc_disable.sqf @@ -5,7 +5,7 @@ * * Arguments: * 0: Vehicle - * 1: Disable (optional) + * 1: Disable (default: true) * * Return Value: * None diff --git a/addons/tagging/functions/fnc_addCustomTag.sqf b/addons/tagging/functions/fnc_addCustomTag.sqf index 4de0fc016c..84a407e2dd 100644 --- a/addons/tagging/functions/fnc_addCustomTag.sqf +++ b/addons/tagging/functions/fnc_addCustomTag.sqf @@ -9,8 +9,8 @@ * 2: Required Item * 3: Textures Paths * 4: Icon Path (default: "") - * 5: Material Paths (optional) - * 6: Tag Model (optional) + * 5: Material Paths (default: []) + * 6: Tag Model (default: "UserTexture1m_F") * * Return Value: * Sucessfully Added Tag diff --git a/addons/tagging/functions/fnc_tag.sqf b/addons/tagging/functions/fnc_tag.sqf index ce31e2360e..5544a50f69 100644 --- a/addons/tagging/functions/fnc_tag.sqf +++ b/addons/tagging/functions/fnc_tag.sqf @@ -6,8 +6,8 @@ * Arguments: * 0: Unit * 1: The colour of the tag (valid colours are black, red, green and blue or full path to custom texture) - * 2: Material of the tag (Optional) - * 3: Tag Model (optional) + * 2: Material of the tag (default: "") + * 3: Tag Model (default: "UserTexture1m_F") * * Return Value: * Sucess diff --git a/docs/tools/document_functions.py b/docs/tools/document_functions.py index 65f6017e76..5febaae446 100644 --- a/docs/tools/document_functions.py +++ b/docs/tools/document_functions.py @@ -161,7 +161,7 @@ class FunctionFile: arguments = [] for argument in lines: - valid = re.match(r"^(\d+):\s(.+?)\<([\s\w,\|]+?)\>( \([Oo]ptional\))?(\s\(default: (.+)\))?$", argument) + valid = re.match(r"^(\d+):\s(.+?)\<([\s\w,\|]+?)\>( )?(\s\(default: (.+)\))?$", argument) if valid: arg_index = valid.group(1)