Skip to content

Commit

Permalink
fix some errors shown by new hemtts sqf linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jokoho48 committed Oct 8, 2024
1 parent 240eff2 commit 4128ee8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
10 changes: 7 additions & 3 deletions addons/CLib/Core/Autoload/fn_sendFunctions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ if (_functionCode isEqualType "") then {
if (isNil QGVAR(TransmissionSize)) then {
GVAR(TransmissionSize) = 0;
};

private _size = count _functionCode/1024;
GVAR(TransmissionSize) = GVAR(TransmissionSize) + _size;
};

#ifdef ISDEV
private _str = format ["SendFunctions: %1, Size: %2KB, Process: %3%4", _functionName, _size, GVAR(receiveFunction) select 2, "%"];
DUMP(_str);
private _str = format ["SendFunctions: %1, Size: %2KB, Process: %3%4", _functionName, _size, GVAR(receiveFunction) select 2, "%"];
DUMP(_str);
#endif

};



_clientID publicVariableClient QGVAR(receiveFunction);
2 changes: 1 addition & 1 deletion addons/CLib/RemoteExecution/fn_execute.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (isNil {currentNamespace getVariable _function} || {!((currentNamespace getVa
if (!isClass (configFile >> "CfgRemoteExecCommands" >> _function) || {!isClass (missionConfigFile >> "CfgRemoteExecCommands" >> _function)} || {!isClass (campaignConfigFile >> "CfgRemoteExecCommands" >> _function)}) exitWith {
LOG("ERROR: Command '" + _function + "' is not allowed to be Executed over Network.");
};
if (_args isKindOf []) then { // if the Command has Arguments that are not array it only can be Unary
if (_args isEqualType []) then { // if the Command has Arguments that are not array it only can be Unary
switch (count _args) do {
// Nular Command
case 0: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ if !(isServer) exitWith {
[QGVAR(createSimpleObjectComp), _this] call CFUNC(serverEvent);
};

if (_uid isEqualTo "") exitWith {
LOG("ERROR: Unique identifier is not valid");
};

params [
["_uid", "", [""]],
Expand All @@ -44,6 +41,10 @@ params [
["_callback", [], [[]], []]
];

if (_uid isEqualTo "") exitWith {
LOG("ERROR: Unique identifier is not valid");
};

if !(isNil {GVAR(compNamespace) getVariable _uid}) then {
LOG("WARNING: the UID is already in use");
};
Expand Down
2 changes: 2 additions & 0 deletions addons/CLib/supportMacros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@
#define SCRIPTSCOPENAME (FUNCTIONNAME + "_Main")

#define RELDIR(pos1,pos2) (((pos1 getRelDir pos2) + 180) % 360 - 180)

//IGNORE_PRIVATE_WARNING ["_fnc_scriptName", "_fnc_scriptNameParent", "_fnc_scriptMap"];

0 comments on commit 4128ee8

Please sign in to comment.