Skip to content

Commit

Permalink
Fixed minor warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapawingo committed Apr 26, 2024
1 parent 1d546c5 commit d5c58f3
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 33 deletions.
10 changes: 5 additions & 5 deletions framework/components/3den/functions/fn_main_iconViewer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ switch _mode do {
private _y0 = 0.5 call _fnc_GRID_Y;

private _ctrls = [];
for [{_i = 0}, {_i < _boxesY}, {_i = _i + 1}] do {
for "_i" from 0 to _boxesY do {
private _y = _y0 + ((0.5 call _fnc_GRID_Y) + _h0) * _i;
private _x = _x0;

for [{_j = 0}, {_j < _boxesX}, {_j = _j + 1}] do {

private "_x";
for "_j" from 0 to _boxesX do {
_x = _x0 + ((0.5 call _fnc_GRID_X) + _w0) * _j;
private _pos = [_x, _y, _w0, _h0];

Expand Down Expand Up @@ -404,7 +404,7 @@ switch _mode do {
private _maxPages = ceil (count _items / _iconsPerPage);

private _n = count _items;
for [{_i = 0}, {_i < _iconsPerPage}, {_i = _i + 1}] do {
for "_i" from 0 to _iconsPerPage do {
private _ctrlBox = _ctrls select _i;

private _idx = _page * _iconsPerPage + _i;
Expand Down
6 changes: 2 additions & 4 deletions framework/components/3den/functions/fn_main_setConfig.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
* Public: No
*/

params ["_cmfMenu"];
// params ["_cmfMenu"];

/* Handle player attempting to delete logic */
{
if ((_x get3DENAttribute 'Name') isEqualTo ['cmf_3den_missionDataLogic_old']) then {
_x addEventHandler ['UnregisteredFromWorld3DEN', {
params ['_entity'];
['Deleted CMF Mission Data', 1, 1] call BIS_fnc_3DENNotification;
}];
};
Expand All @@ -41,7 +40,6 @@ FUNC(setConfig_missionDataHandler) = {
GVAR(missionDataLogic_old) = _logic;

_logic addEventHandler ['UnregisteredFromWorld3DEN', {
params ['_entity'];
['Deleted CMF Mission Data', 1, 1] call BIS_fnc_3DENNotification;
}];

Expand Down Expand Up @@ -125,7 +123,7 @@ FUNC(setConfig_missionDataHandler) = {
} else {
_pictures select lbCurSel (_display displayCtrl 101)
};
private _gameType = [([_hash, "M_TYPE"] call CBA_fnc_hashGet) select 1, [_hash, "M_CTYPE"] call CBA_fnc_hashGet] select ((([_hash, "M_TYPE"] call CBA_fnc_hashGet) select 1) isEqualTo "custom");
// private _gameType = [([_hash, "M_TYPE"] call CBA_fnc_hashGet) select 1, [_hash, "M_CTYPE"] call CBA_fnc_hashGet] select ((([_hash, "M_TYPE"] call CBA_fnc_hashGet) select 1) isEqualTo "custom");
private _author = profileName;
private _gameName = [_hash, "M_TITLE"] call CBA_fnc_hashGet;

Expand Down
2 changes: 1 addition & 1 deletion framework/components/aar/functions/fn_endMission.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ EFUNC(inline_aar,endMission) = {
private _operationName = [_hash, "M_TITLE", [getMissionConfigValue ['IntelBriefingName', briefingName]] call EFUNC(common,hexToASCII)] call CBA_fnc_hashGet;
private _op = format ["<t color='#%3'>%1 was an operational %2</t>", _operationName, (["Success", "Failure"] select !_opSuccess), (["fcba03", "fc3d03"] select !_opSuccess)];
private _tac = format ["<t>%1 was a tactical %2</t>", _operationName, (["Success", "Failure"] select !_tacSuccess)];
private _message = _message splitString toString [13,10] joinString "<br/>";
private _message = _message splitString toString [13, 10] joinString "<br/>";
if (_message != "") then { _message = format ["<br/> <t>%1</t>", _message]; };
private _objectives = _objectivesState splitString toString [13,10] joinString "<br/>";
if (_objectives != "") then { _objectives = format ["<br/><t color='#888888'>%1</t>", _objectives]; };
Expand Down
5 changes: 3 additions & 2 deletions framework/components/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ cmf_player removeDiarySubject "Units";

/* Remove KP ranks ace interactions */
[{
if (isNil { ([(ace_interact_menu_ActSelfNamespace getVariable typeOf player), ["ACE_SelfActions","KPR_Admin"]] call ace_interact_menu_fnc_findActionNode) }) exitWith {};
playerClass = typeOf player;
if (isNil { ([(ace_interact_menu_ActSelfNamespace getVariable playerClass), ["ACE_SelfActions","KPR_Admin"]] call ace_interact_menu_fnc_findActionNode) }) exitWith {};

[(typeOf player), 1, ["ACE_SelfActions", "KPR_Admin"]] call ace_interact_menu_fnc_removeActionFromClass;
[(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment", "KPR_Check"]] call ace_interact_menu_fnc_removeActionFromClass;
Expand Down Expand Up @@ -76,7 +77,7 @@ cmf_player addEventHandler ["Killed", {

/* Player respawn event */
cmf_player addEventHandler ["Respawn", {
params ["_unit", "_corpse"];
params ["_unit", ""];

/* Load loadout */
if (!isNil { cmf_player getVariable [QGVAR(player_loadout), nil] }) then {
Expand Down
4 changes: 2 additions & 2 deletions framework/components/common/functions/fn_countDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
params ["_time", "_text", ["_blocking", false]];

private _fnc_CD_CountDown = {
params["_time", "_text", "_i"];
params["_time", "_text"];

for [{ _i=_time }, { _i >= 0 }, { _i = _i - 1 }] do {
for "_i" from _time to 0 step -1 do {
hintSilent (format ["%1 %2", _text, ([_i / 60 + 0.01, "HH:MM"] call BIS_fnc_timetostring)]);
sleep 1;
};
Expand Down
3 changes: 2 additions & 1 deletion framework/components/common/functions/fn_diary.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@
private _settingsArr = [GVAR(clientSettings), _x] call CBA_fnc_hashGet;
{
private _title = [_x select 1, (_x select 1) select 0] select ((_x select 1) isEqualType []);
private _setting = _x;
_clientSettings = _clientSettings + format [
"<font size='13'> %1: <font color='#fcba03'>%2</font><br/>",
_title,
str (missionNamespace getVariable [_x select 0, ""])
str (missionNamespace getVariable [_setting select 0, ""])
];
} forEach _settingsArr;
_clientSettings = _clientSettings + "<br/>";
Expand Down
2 changes: 1 addition & 1 deletion framework/components/common/functions/fn_parseMarkdown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _style = createHashMapFromArray _style;
private _parsedStyles = createHashMap;
{
private _key = _x;
private _value = _y;
// private _value = _y;

private _parsed = "";
if _diary then {
Expand Down
8 changes: 5 additions & 3 deletions framework/components/main/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#endif

/* Disable sqf-vm linting errors for include lookups */
#pragma sls disable file SQFVM-70014
#pragma sls disable file SQFVM-10004
#pragma sls disable file SQFVM-70014 // External Includes Lookup
#pragma sls disable file SQFVM-10004 // External Includes Fail
#pragma sls disable file VV-001 // Unused Private Variable
#pragma sls disable file VV-006 // Node type mismatch

#include "script_mod.hpp"

Expand All @@ -19,4 +21,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
#endif

#include "script_macros.hpp"
#include "script_macros.hpp"
27 changes: 15 additions & 12 deletions framework/components/menu/functions/fn_diagnostics.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
params ["_target"];

private _action = ([QGVAR(diag_menu), "Diagnostics", "z\ace\addons\medical_gui\data\categories\advanced_treatment.paa", {}, { true }, {
params ["_target", "_player"];
private _actions = [];

/* Client */
private _action = ([QGVAR(client), "Client", "a3\ui_f\data\gui\rsc\rscdisplaymultiplayersetup\disabledai_ca.paa", {}, { true }, {
params ["_target", "_player"];
private _actions = [];

/* FPS */
Expand All @@ -32,25 +34,25 @@ private _action = ([QGVAR(diag_menu), "Diagnostics", "z\ace\addons\medical_gui\d
_actions pushBack [_action, [], _target];

/* Spawned scripts */
private _action = ([QGVAR(fps), "Spawned Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
_action = ([QGVAR(fps), "Spawned Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["Spawn Scripts: %1", diag_activeScripts select 0]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];

/* execVM scripts */
private _action = ([QGVAR(fps), "ExecVM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
_action = ([QGVAR(fps), "ExecVM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["ExecVM Scripts: %1", diag_activeScripts select 1]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];

/* exec scripts */
private _action = ([QGVAR(fps), "Exec Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
/* execute scripts */
_action = ([QGVAR(fps), "Exec Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["Exec Scripts: %1", diag_activeScripts select 2]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];

/* execFSM scripts */
private _action = ([QGVAR(fps), "ExecFSM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
_action = ([QGVAR(fps), "ExecFSM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["ExecFSM Scripts: %1", diag_activeScripts select 3]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];
Expand All @@ -60,7 +62,8 @@ private _action = ([QGVAR(diag_menu), "Diagnostics", "z\ace\addons\medical_gui\d
_actions pushBack [_action, [], _target];

/* Server */
private _action = ([QGVAR(server), "Server", "a3\3den\data\displays\display3den\statusbar\server_ca.paa", {}, { !isServer }, {
_action = ([QGVAR(server), "Server", "a3\3den\data\displays\display3den\statusbar\server_ca.paa", {}, { !isServer }, {
params ["_target", "_player"];
private _actions = [];

/* FPS */
Expand All @@ -70,25 +73,25 @@ private _action = ([QGVAR(diag_menu), "Diagnostics", "z\ace\addons\medical_gui\d
_actions pushBack [_action, [], _target];

/* Spawned scripts */
private _action = ([QGVAR(fps), "Spawned Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
_action = ([QGVAR(fps), "Spawned Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["Spawn Scripts: %1", (missionNamespace getVariable [QEGVAR(diagnostic,serverScripts), ["?","?","?","?"]]) select 0]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];

/* execVM scripts */
private _action = ([QGVAR(fps), "ExecVM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
_action = ([QGVAR(fps), "ExecVM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["ExecVM Scripts: %1", (missionNamespace getVariable [QEGVAR(diagnostic,serverScripts), ["?","?","?","?"]]) select 1]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];

/* exec scripts */
private _action = ([QGVAR(fps), "Exec Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
/* execute scripts */
_action = ([QGVAR(fps), "Exec Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["Exec Scripts: %1", (missionNamespace getVariable [QEGVAR(diagnostic,serverScripts), ["?","?","?","?"]]) select 2]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];

/* execFSM scripts */
private _action = ([QGVAR(fps), "ExecFSM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
_action = ([QGVAR(fps), "ExecFSM Scripts:", "a3\3den\data\cfgwaypoints\scripted_ca.paa", { }, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["ExecFSM Scripts: %1", (missionNamespace getVariable [QEGVAR(diagnostic,serverScripts), ["?","?","?","?"]]) select 3]]
}] call ace_interact_menu_fnc_createAction);
_actions pushBack [_action, [], _target];
Expand All @@ -98,7 +101,7 @@ private _action = ([QGVAR(diag_menu), "Diagnostics", "z\ace\addons\medical_gui\d
_actions pushBack [_action, [], _target];

/* Error Count */
private _action = ([QGVAR(fps), "Errors: 0", ["a3\ui_f\data\igui\cfg\simpletasks\types\documents_ca.paa", (EGVAR(common,notificationColors) get "ERROR") call BIS_fnc_colorRGBtoHTML], {
_action = ([QGVAR(fps), "Errors: 0", ["a3\ui_f\data\igui\cfg\simpletasks\types\documents_ca.paa", (EGVAR(common,notificationColors) get "ERROR") call BIS_fnc_colorRGBtoHTML], {
([] call BIS_fnc_displayMission) createDisplay "CMF_RscLog";
}, { true }, { }, [], "", 4, [false, false, false, true, false], {
(_this select 3) set [1, format ["Errors: %1", count EGVAR(diagnostic,errorOut)]]
Expand Down
4 changes: 3 additions & 1 deletion framework/components/organization/shacktacInit.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma sls disable VV-001
#pragma sls disable VV-006
STHud_Namelist = {
params ["_canvas"];

Expand Down Expand Up @@ -69,7 +71,7 @@ STHud_Namelist = {

private _bearingBase = (str round _bearing);

private ["_bearingPretty"];
private "_bearingPretty";
switch (count _bearingBase) do
{
case 1: { _bearingPretty = "00" + _bearingBase };
Expand Down
1 change: 1 addition & 0 deletions framework/rsc/loadouts/!ai_arsenal_template.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma sls disable VV-001
/*
* Author: [Author]
* [Description]
Expand Down
1 change: 1 addition & 0 deletions framework/rsc/loadouts/!arsenal_template.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma sls disable VV-001
/*
* Author: [Author]
* [Description]
Expand Down
1 change: 1 addition & 0 deletions framework/rsc/loadouts/!logistics_template.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma sls disable VV-001
/*
* Author: [Author]
* [Description]
Expand Down
2 changes: 1 addition & 1 deletion framework/rsc/ui/RscLog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class CMF_RscLog {
idd = -1;
movingEnable = "true";
onLoad = QUOTE(_this call FUNC(initDisplayLog))
onLoad = QUOTE(_this call FUNC(initDisplayLog));
class ControlsBackground {
//class BackgroundDisable: ctrlStaticBackgroundDisable {};
//class BackgroundDisableTiles: ctrlStaticBackgroundDisableTiles {};
Expand Down

0 comments on commit d5c58f3

Please sign in to comment.