From fb3b194a713bf78f5b5acfc5c84e3766e6fe49d0 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Fri, 27 Dec 2024 17:29:33 +0100 Subject: [PATCH] Fix return types --- addons/civilian/functions/fnc_createCivilian.sqf | 2 +- addons/civilian/functions/fnc_getNearestCity.sqf | 3 ++- addons/civilian/functions/fnc_getNearestVehicle.sqf | 2 +- addons/civilian/functions/fnc_initCivilian.sqf | 2 ++ addons/common/functions/fnc_deleteAtRandom.sqf | 2 +- addons/common/functions/fnc_getNearestLocationName.sqf | 2 +- addons/common/functions/fnc_getRandomPos.sqf | 2 +- addons/common/functions/fnc_getTextFromConfig.sqf | 2 +- addons/common/functions/fnc_showMessage.sqf | 4 +++- addons/jail/functions/fnc_canRelease.sqf | 2 +- addons/jail/functions/fnc_getRandomJailPos.sqf | 2 +- addons/killers/functions/fnc_anyKillerFree.sqf | 2 +- addons/modules/functions/fnc_initKillersStarts.sqf | 2 +- addons/modules/functions/fnc_initKillersStashes.sqf | 2 +- addons/modules/functions/fnc_initPoliceStations.sqf | 2 +- addons/score/functions/fnc_addPoliceScore.sqf | 2 ++ 16 files changed, 21 insertions(+), 14 deletions(-) diff --git a/addons/civilian/functions/fnc_createCivilian.sqf b/addons/civilian/functions/fnc_createCivilian.sqf index 6731df01..a643c7c6 100644 --- a/addons/civilian/functions/fnc_createCivilian.sqf +++ b/addons/civilian/functions/fnc_createCivilian.sqf @@ -25,4 +25,4 @@ if (_civilian isEqualTo objNull) exitWith { WARNING_2("Failed creating civilian %1 at %2",_unit,_position); }; -[_civilian] call FUNC(initCivilian); +[_civilian] call FUNC(initCivilian) diff --git a/addons/civilian/functions/fnc_getNearestCity.sqf b/addons/civilian/functions/fnc_getNearestCity.sqf index 05cc4fa7..26a60cd3 100644 --- a/addons/civilian/functions/fnc_getNearestCity.sqf +++ b/addons/civilian/functions/fnc_getNearestCity.sqf @@ -27,4 +27,5 @@ _nearestTown = [_position, _searchRadius] call EFUNC(common,getNearestCityLocati // Return city namespace or objNull if not found if (_nearestTown isEqualTo locationNull) exitWith {objNull}; -[_nearestTown] call FUNC(getCityByLocation); + +[_nearestTown] call FUNC(getCityByLocation) diff --git a/addons/civilian/functions/fnc_getNearestVehicle.sqf b/addons/civilian/functions/fnc_getNearestVehicle.sqf index 73753e1e..cb40333c 100644 --- a/addons/civilian/functions/fnc_getNearestVehicle.sqf +++ b/addons/civilian/functions/fnc_getNearestVehicle.sqf @@ -9,7 +9,7 @@ * 2: Filter function returning true for valid vehicles (Optional) * * Return Value: - * None + * Nearest vehicle or objNull if not found * * Example: * [player] call afsk_civilian_fnc_getNearestVehicle diff --git a/addons/civilian/functions/fnc_initCivilian.sqf b/addons/civilian/functions/fnc_initCivilian.sqf index 65c16a83..19675ff4 100644 --- a/addons/civilian/functions/fnc_initCivilian.sqf +++ b/addons/civilian/functions/fnc_initCivilian.sqf @@ -35,3 +35,5 @@ _civilian addEventHandler ["Killed", { [_civilian, _cityNamespace] call FUNC(assignCityCivilian); GVAR(civilians) pushBack _civilian; _civilian setVariable [QGVAR(initialized), true]; + +_civilian diff --git a/addons/common/functions/fnc_deleteAtRandom.sqf b/addons/common/functions/fnc_deleteAtRandom.sqf index fac9b37b..eacf4d78 100644 --- a/addons/common/functions/fnc_deleteAtRandom.sqf +++ b/addons/common/functions/fnc_deleteAtRandom.sqf @@ -17,4 +17,4 @@ params ["_array"]; -_array deleteAt (floor (random (count _array))); +_array deleteAt (floor (random (count _array))) diff --git a/addons/common/functions/fnc_getNearestLocationName.sqf b/addons/common/functions/fnc_getNearestLocationName.sqf index d1db4611..b88731a3 100644 --- a/addons/common/functions/fnc_getNearestLocationName.sqf +++ b/addons/common/functions/fnc_getNearestLocationName.sqf @@ -30,4 +30,4 @@ if (_pos isEqualType objNull) then { private _nearestLocation = [_pos, _searchRadius] call FUNC(getNearestLocationWithAvailableName); if (_nearestLocation isEqualTo locationNull) exitWith {""}; -[_nearestLocation] call FUNC(getLocationName); +[_nearestLocation] call FUNC(getLocationName) diff --git a/addons/common/functions/fnc_getRandomPos.sqf b/addons/common/functions/fnc_getRandomPos.sqf index d362ebba..ed67f5fc 100644 --- a/addons/common/functions/fnc_getRandomPos.sqf +++ b/addons/common/functions/fnc_getRandomPos.sqf @@ -63,4 +63,4 @@ while {(_loopLimit >= 0) && {(_randomPos isEqualTo [])}} do { if (_loopLimit isEqualTo 0) exitWith {[]}; -_randomPos; +_randomPos diff --git a/addons/common/functions/fnc_getTextFromConfig.sqf b/addons/common/functions/fnc_getTextFromConfig.sqf index 122a8aec..a7badd74 100644 --- a/addons/common/functions/fnc_getTextFromConfig.sqf +++ b/addons/common/functions/fnc_getTextFromConfig.sqf @@ -7,7 +7,7 @@ * None * * Return Value: - * None + * Text read from config * * Example: * None diff --git a/addons/common/functions/fnc_showMessage.sqf b/addons/common/functions/fnc_showMessage.sqf index 24ee6aa5..8eb2126c 100644 --- a/addons/common/functions/fnc_showMessage.sqf +++ b/addons/common/functions/fnc_showMessage.sqf @@ -23,4 +23,6 @@ if (GVAR(ACE_Loaded)) then { [_msg, _size, _target, _width] call ACE_common_fnc_displayTextStructured; } else { hint _msg; -} +}; + +nil diff --git a/addons/jail/functions/fnc_canRelease.sqf b/addons/jail/functions/fnc_canRelease.sqf index d4a4802f..63949adb 100644 --- a/addons/jail/functions/fnc_canRelease.sqf +++ b/addons/jail/functions/fnc_canRelease.sqf @@ -8,7 +8,7 @@ * 1: Unit to release * * Return Value: - * None + * Whether target unit can be released * * Example: * [bob, ted] call afsk_jail_fnc_canBeReleased diff --git a/addons/jail/functions/fnc_getRandomJailPos.sqf b/addons/jail/functions/fnc_getRandomJailPos.sqf index 62ea2e45..33689ee7 100644 --- a/addons/jail/functions/fnc_getRandomJailPos.sqf +++ b/addons/jail/functions/fnc_getRandomJailPos.sqf @@ -15,4 +15,4 @@ * Public: No */ -[[[getPosATL GVAR(jail), GVAR(jail) getVariable "objectArea"]], ["water"]] call BIS_fnc_randomPos; +[[[getPosATL GVAR(jail), GVAR(jail) getVariable "objectArea"]], ["water"]] call BIS_fnc_randomPos diff --git a/addons/killers/functions/fnc_anyKillerFree.sqf b/addons/killers/functions/fnc_anyKillerFree.sqf index 8b467f5e..d6aac31d 100644 --- a/addons/killers/functions/fnc_anyKillerFree.sqf +++ b/addons/killers/functions/fnc_anyKillerFree.sqf @@ -7,7 +7,7 @@ * None * * Return Value: - * None + * True if any killer is still free * * Example: * call afsk_killers_fnc_anyKillerFree diff --git a/addons/modules/functions/fnc_initKillersStarts.sqf b/addons/modules/functions/fnc_initKillersStarts.sqf index 29990f1d..8a6b3947 100644 --- a/addons/modules/functions/fnc_initKillersStarts.sqf +++ b/addons/modules/functions/fnc_initKillersStarts.sqf @@ -7,7 +7,7 @@ * None * * Return Value: - * None + * List of killers start modules > * * Example: * None diff --git a/addons/modules/functions/fnc_initKillersStashes.sqf b/addons/modules/functions/fnc_initKillersStashes.sqf index 8aec1857..90b9d979 100644 --- a/addons/modules/functions/fnc_initKillersStashes.sqf +++ b/addons/modules/functions/fnc_initKillersStashes.sqf @@ -7,7 +7,7 @@ * None * * Return Value: - * None + * List of killers stash modules > * * Example: * None diff --git a/addons/modules/functions/fnc_initPoliceStations.sqf b/addons/modules/functions/fnc_initPoliceStations.sqf index 3c56e4ea..963040d2 100644 --- a/addons/modules/functions/fnc_initPoliceStations.sqf +++ b/addons/modules/functions/fnc_initPoliceStations.sqf @@ -7,7 +7,7 @@ * None * * Return Value: - * None + * List of police station modules > * * Example: * None diff --git a/addons/score/functions/fnc_addPoliceScore.sqf b/addons/score/functions/fnc_addPoliceScore.sqf index d551778c..8d8151aa 100644 --- a/addons/score/functions/fnc_addPoliceScore.sqf +++ b/addons/score/functions/fnc_addPoliceScore.sqf @@ -39,3 +39,5 @@ GVAR(policeScoreLastChangeTime) = CBA_missionTime; publicVariable QGVAR(policeScoreChange); }; }, [GVAR(policeScoreChange)], 5] call CBA_fnc_waitAndExecute; + +GVAR(policeScore)