Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server function cleanup (Changing all BIS_fnc_Param with Param/Params) #576

Closed
wants to merge 122 commits into from
Closed
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
17368ed
Removal of the same private variable
koalas11 Sep 11, 2019
42a8625
Update fn_insertVehicle.sqf
koalas11 Sep 15, 2019
aae00bb
Merge branch 'master' into patch-1
koalas11 Sep 15, 2019
8797807
Update fn_numberSafe.sqf
koalas11 Sep 15, 2019
949094e
Remove of a useless line in fn_UpdatePartial.sqf
koalas11 Sep 15, 2019
9039748
Revoke first update (i messed up)
koalas11 Sep 16, 2019
1b56c1d
Cleanup of fn_asyncCall.sqf
koalas11 Sep 17, 2019
dc85e8d
Cleanup of fn_bool.sqf
koalas11 Sep 17, 2019
517002e
Update fn_mresArray.sqf
koalas11 Sep 17, 2019
f91221b
Update fn_mresString.sqf
koalas11 Sep 17, 2019
e5fed2b
Update fn_mresToArray.sqf
koalas11 Sep 17, 2019
8989b9b
Update fn_numberSafe.sqf
koalas11 Sep 17, 2019
15a1afb
Update fn_queryRequest.sqf
koalas11 Sep 17, 2019
9040643
Update fn_queryRequest.sqf
koalas11 Sep 17, 2019
e2023ca
Update fn_updateRequest.sqf
koalas11 Sep 17, 2019
9ecf7ac
Update fn_queryRequest.sqf
koalas11 Sep 17, 2019
95f34bd
Update fn_queryRequest.sqf
koalas11 Sep 17, 2019
ab2e60f
Update fn_updatePartial.sqf
koalas11 Sep 17, 2019
0027cce
Update fn_updatePartial.sqf
koalas11 Sep 17, 2019
e6e6e1b
Update fn_updatePartial.sqf
koalas11 Sep 17, 2019
3a9f058
Update fn_vehicleStore.sqf
koalas11 Sep 17, 2019
8c2a6d9
Update fn_vehicleDelete.sqf
koalas11 Sep 17, 2019
ac4153f
Update fn_vehicleCreate.sqf
koalas11 Sep 18, 2019
ca05a05
Update fn_vehicleUpdate.sqf
koalas11 Sep 18, 2019
8b5ed00
Update fn_spikeStrip.sqf
koalas11 Sep 18, 2019
61c0aca
Update fn_recupKeyForHC.sqf
koalas11 Sep 18, 2019
03ee4e4
Update fn_manageSC.sqf
koalas11 Sep 18, 2019
506dbdd
Update fn_keyManagement.sqf
koalas11 Sep 18, 2019
5335d2a
Update fn_huntingZone.sqf
koalas11 Sep 18, 2019
e9d583b
Update fn_cleanupRequest.sqf
koalas11 Sep 18, 2019
93cd778
Update fn_getVehicles.sqf
koalas11 Sep 18, 2019
31888f5
Update fn_queryPlayerGang.sqf
koalas11 Sep 18, 2019
1cd5d90
Update fn_removeGang.sqf
koalas11 Sep 18, 2019
578b42a
Update fn_removeGang.sqf
koalas11 Sep 19, 2019
34d6850
Update fn_queryPlayerGang.sqf
koalas11 Sep 19, 2019
7f1c849
Update fn_insertVehicle.sqf
koalas11 Sep 19, 2019
1aea08c
Merge branch 'master' into patch-1
koalas11 Sep 19, 2019
5bd2001
Update fn_mresArray.sqf
koalas11 Sep 19, 2019
dd8a1ab
Update fn_mresString.sqf
koalas11 Sep 19, 2019
abcd677
Update fn_mresToArray.sqf
koalas11 Sep 19, 2019
fc4106f
Update fn_cleanupRequest.sqf
koalas11 Sep 19, 2019
1cb5dbc
Update fn_spikeStrip.sqf
koalas11 Sep 19, 2019
6355792
Update fn_removeGang.sqf
koalas11 Sep 19, 2019
d5cd44f
Update fn_asyncCall.sqf
koalas11 Sep 19, 2019
523a595
Update fn_numberSafe.sqf
koalas11 Sep 19, 2019
52a6a72
Update fn_cleanupRequest.sqf
koalas11 Sep 19, 2019
626f19b
Update fn_getVehicles.sqf
koalas11 Sep 19, 2019
754f4d8
Update fn_spikeStrip.sqf
koalas11 Sep 19, 2019
ec6717a
Update fn_deleteDBContainer.sqf
koalas11 Sep 20, 2019
d4883fc
Update fn_sellHouse.sqf
koalas11 Sep 20, 2019
53d9db4
Update fn_sellHouseContainer.sqf
koalas11 Sep 20, 2019
f56a598
Update fn_updateHouseContainers.sqf
koalas11 Sep 20, 2019
2a03912
Update fn_updateHouseTrunk.sqf
koalas11 Sep 20, 2019
093c857
Update fn_insertRequest.sqf
koalas11 Sep 20, 2019
212dda1
Update fn_updateHouseContainers.sqf
koalas11 Sep 20, 2019
a2d8e90
Update fn_spikeStrip.sqf
koalas11 Sep 20, 2019
75974ef
Update fn_queryRequest.sqf
koalas11 Sep 21, 2019
42bb146
Update fn_huntingZone.sqf
koalas11 Sep 21, 2019
d27b85a
Update fn_keyManagement.sqf
koalas11 Sep 21, 2019
3ae8653
Update fn_vehicleCreate.sqf
koalas11 Sep 21, 2019
3fd5e9f
Update fn_vehicleUpdate.sqf
koalas11 Sep 21, 2019
627a3fc
Update fn_updateRequest.sqf
koalas11 Sep 21, 2019
893506a
Update fn_huntingZone.sqf
koalas11 Sep 21, 2019
74a0df5
Update fn_updatePartial.sqf
koalas11 Sep 22, 2019
279166a
Update fn_vehicleStore.sqf
koalas11 Sep 22, 2019
d55d8d6
Update fn_insertGang.sqf
koalas11 Sep 22, 2019
5e54f4c
Update fn_updateGang.sqf
koalas11 Sep 22, 2019
539cc73
Update fn_addContainer.sqf
koalas11 Sep 22, 2019
9e59de6
Update fn_addHouse.sqf
koalas11 Sep 22, 2019
bb49195
Update fn_fetchPlayerHouses.sqf
koalas11 Sep 22, 2019
e86ee91
Update fn_initHouses.sqf
koalas11 Sep 22, 2019
762f65c
Update fn_jailSys.sqf
koalas11 Sep 22, 2019
b3b6744
Update fn_getPlayTime.sqf
koalas11 Sep 22, 2019
6b72e36
Update fn_getPlayTime.sqf
koalas11 Sep 22, 2019
6ee4f77
Update fn_setPlayTime.sqf
koalas11 Sep 22, 2019
91ce6a2
Update fn_wantedFetch.sqf
koalas11 Sep 22, 2019
d0809ec
Update fn_wantedPerson.sqf
koalas11 Sep 22, 2019
2224d09
Update fn_wantedProfUpdate.sqf
koalas11 Sep 22, 2019
1cf3d3f
Update fn_wantedRemove.sqf
koalas11 Sep 22, 2019
259fd76
Update fn_getID.sqf
koalas11 Sep 22, 2019
da4379f
Update fn_handleBlastingCharge.sqf
koalas11 Sep 22, 2019
885c017
Update fn_transferOwnership.sqf
koalas11 Sep 22, 2019
7fef80e
Update fn_whoDoneIt.sqf
koalas11 Sep 22, 2019
3ea1a47
Update fix_headgear.sqf
koalas11 Sep 22, 2019
aabff20
Update init.sqf
koalas11 Sep 22, 2019
fc57dc0
Update fn_updatePartial.sqf
koalas11 Sep 22, 2019
bdd70cb
(Probably) Finish of PR
koalas11 Sep 22, 2019
0cfa48c
Small Changes
koalas11 Sep 22, 2019
f433926
Need a test
koalas11 Sep 22, 2019
fcfea8c
Merge remote-tracking branch 'origin/patch-1' into patch-1
koalas11 Sep 22, 2019
d4b37ed
Update fn_updatePartial.sqf
koalas11 Sep 22, 2019
e3f334b
Update fn_updateGang.sqf
koalas11 Sep 22, 2019
c62fe8f
Update fn_asyncCall.sqf
koalas11 Sep 25, 2019
dc3f8c2
remove of useless []
koalas11 Sep 25, 2019
6be6298
Update fn_asyncCall.sqf
koalas11 Sep 25, 2019
43cb1c6
Update fn_terrainSort.sqf
koalas11 Sep 25, 2019
1571b37
Update fn_terrainSort.sqf
koalas11 Sep 25, 2019
65cd7cc
changed 2 files i forgot to check and changed fn_updateGang.sqf
koalas11 Sep 26, 2019
3262120
More optimization
koalas11 Sep 27, 2019
dec07f6
Fixs of Errors
koalas11 Sep 28, 2019
030ec1f
More Optimization
koalas11 Sep 30, 2019
69c533d
Fix of an error
koalas11 Sep 30, 2019
ad163c1
More Optimization
koalas11 Oct 2, 2019
cc4d563
Update fn_asyncCall.sqf
koalas11 Oct 2, 2019
72ef19b
Error fix
koalas11 Oct 2, 2019
cc98a00
fix of errors
koalas11 Oct 2, 2019
d0aa6ab
Update cleanup.fsm
koalas11 Oct 3, 2019
6d62b95
Update timeModule.fsm
koalas11 Oct 3, 2019
b138db3
Update timeModule.fsm
koalas11 Oct 3, 2019
0092a1f
More Optimization (need to test)
koalas11 Oct 6, 2019
614bf2e
fix of error
koalas11 Oct 6, 2019
66c71fe
fix of error
koalas11 Oct 6, 2019
4d9b4ab
fix of more error (shuold be last for some time)
koalas11 Oct 6, 2019
8f6b358
It's not over yet :P
koalas11 Oct 7, 2019
5d8708e
error fix
koalas11 Oct 7, 2019
eafd939
test
koalas11 Oct 8, 2019
44e4b6c
fix of error + terrainsort revert update
koalas11 Oct 9, 2019
e4dc0ad
error fix
koalas11 Oct 9, 2019
515f2e6
some error fix we have still more error to fix
koalas11 Oct 14, 2019
a10f734
error fix
koalas11 Oct 14, 2019
33e7c76
error fix
koalas11 Oct 14, 2019
1b5f0b4
error fix
koalas11 Oct 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions life_server/Functions/Gangs/fn_queryPlayerGang.sqf
Expand Up @@ -5,14 +5,12 @@
Description:
Queries to see if the player belongs to any gang.
*/
private ["_query","_queryResult"];
private _query = format ["SELECT id, owner, name, maxmembers, bank, members FROM gangs WHERE active='1' AND members LIKE '%2%1%2'",_this,"%"];

_query = format ["SELECT id, owner, name, maxmembers, bank, members FROM gangs WHERE active='1' AND members LIKE '%2%1%2'",_this,"%"];

_queryResult = [_query,2] call DB_fnc_asyncCall;
private _queryResult = [_query,2] call DB_fnc_asyncCall;

if !(count _queryResult isEqualTo 0) then {
_tmp = [_queryResult select 5] call DB_fnc_mresToArray;
private _tmp = [_queryResult select 5] call DB_fnc_mresToArray;
if (_tmp isEqualType "") then {_tmp = call compile format ["%1", _tmp];};
_queryResult set[5, _tmp];
};
Expand Down
6 changes: 4 additions & 2 deletions life_server/Functions/Gangs/fn_removeGang.sqf
Expand Up @@ -6,8 +6,10 @@
Description:
Removes gang from database
*/
private ["_group","_groupID"];
_group = param [0,grpNull,[grpNull]];
private ["_groupID","_result"];
params [
["_group",grpNull,[grpNull]]
];
if (isNull _group) exitWith {};

_groupID = _group getVariable ["gang_id",-1];
Expand Down
11 changes: 7 additions & 4 deletions life_server/Functions/MySQL/fn_asyncCall.sqf
Expand Up @@ -11,10 +11,12 @@
1: INTEGER (1 = ASYNC + not return for update/insert, 2 = ASYNC + return for query's).
3: BOOL (True to return a single array, false to return multiple entries mainly for garage).
*/
private ["_queryStmt","_mode","_multiarr","_queryResult","_key","_return","_loop"];
_queryStmt = [_this,0,"",[""]] call BIS_fnc_param;
_mode = [_this,1,1,[0]] call BIS_fnc_param;
_multiarr = [_this,2,false,[false]] call BIS_fnc_param;
private ["_queryResult","_key","_return","_loop","_pipe"];
params [
["_queryStmt","",[""]],
["_mode",1,[0]],
["_multiarr",false,[false]]
];

_key = EXTDB format ["%1:%2:%3",_mode,FETCH_CONST(life_sql_id),_queryStmt];

Expand Down Expand Up @@ -52,3 +54,4 @@ if (!_multiarr && count _return > 0) then {
};

_return;

7 changes: 4 additions & 3 deletions life_server/Functions/MySQL/fn_bool.sqf
Expand Up @@ -6,9 +6,10 @@
Handles bool conversion for MySQL since MySQL doesn't support 'true' or 'false'
instead MySQL uses Tinyint for BOOLEAN (0 = false, 1 = true)
*/
private ["_bool","_mode"];
_bool = [_this,0,0,[false,0]] call BIS_fnc_param;
_mode = [_this,1,0,[0]] call BIS_fnc_param;
params [
["_bool",0,[false,0]],
["_mode",0,[0]]
];

switch (_mode) do {
case 0: {
Expand Down
12 changes: 6 additions & 6 deletions life_server/Functions/MySQL/fn_insertVehicle.sqf
Expand Up @@ -5,20 +5,20 @@
Description:
Inserts the vehicle into the database
*/
private ["_query","_sql"];

params [
koalas11 marked this conversation as resolved.
Show resolved Hide resolved
"_uid",
"_side",
"_type",
"_className",
["_uid","",[""]],
["_side",sideUnknown,[civilian]],
["_type","",[""]],
["_className","",[""]],
["_color",-1,[0]],
["_plate",-1,[0]]
];

//Stop bad data being passed.
if (_uid isEqualTo "" || _side isEqualTo "" || _type isEqualTo "" || _className isEqualTo "" || _color isEqualTo -1 || _plate isEqualTo -1) exitWith {};

_query = format ["INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""', '%5', '%6','""[]""','""[]""')",_side,_className,_type,_uid,_color,_plate];
private _query = format ["INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""', '%5', '%6','""[]""','""[]""')",_side,_className,_type,_uid,_color,_plate];


[_query,1] call DB_fnc_asyncCall;
2 changes: 1 addition & 1 deletion life_server/Functions/MySQL/fn_mresArray.sqf
Expand Up @@ -8,7 +8,7 @@
any problems. The return method is 'hacky' but it's effective.
*/
private ["_array"];
_array = [_this,0,[],[[]]] call BIS_fnc_param;
_array = param [0,[],[[]]];
_array = str _array;
_array = toArray(_array);

Expand Down
2 changes: 1 addition & 1 deletion life_server/Functions/MySQL/fn_mresString.sqf
Expand Up @@ -6,7 +6,7 @@
Makes the string safe to be passed to MySQL (strips various stuff).
*/
private ["_string","_filter"];
_string = [_this,0,"",[""]] call BIS_fnc_param;
_string = param [0,"",[""]];
_filter = "'/\`:|;,{}-""<>";

_string = toArray _string; //Blow it up to an array
Expand Down
6 changes: 3 additions & 3 deletions life_server/Functions/MySQL/fn_mresToArray.sqf
Expand Up @@ -8,19 +8,19 @@
any problems. The return method is 'hacky' but it's effective.
*/
private ["_array"];
_array = [_this,0,"",[""]] call BIS_fnc_param;
_array = param [0,"",[""]];
if (_array isEqualTo "") exitWith {[]};
_array = toArray(_array);

for "_i" from 0 to (count _array)-1 do
{
_sel = _array select _i;
if (_sel == 96) then
if (_sel IsEqualTo 96) then
{
_array set[_i,39];
};
};

_array = toString(_array);
_array = call compile format ["%1", _array];
_array;
_array;
10 changes: 6 additions & 4 deletions life_server/Functions/MySQL/fn_numberSafe.sqf
Expand Up @@ -11,10 +11,12 @@
Returns:
STRING
*/
private ["_number","_mod","_digots","_digitsCount","_modBase","_numberText"];
private ["_digitsCount","_modBase","_numberText"];

_number = [_this,0,0,[0]] call bis_fnc_param;
_mod = [_this,1,3,[0]] call bis_fnc_param;
params [
["_number",0,[0]],
["_mod",3,[0]]
];

_digits = _number call bis_fnc_numberDigits;
_digitsCount = count _digits - 1;
Expand All @@ -25,4 +27,4 @@ _numberText = "";
_numberText = _numberText + str _x;
if ((_foreachindex - _modBase) % (_mod) isEqualTo 0 && !(_foreachindex isEqualTo _digitsCount)) then {_numberText = _numberText + "";};
} forEach _digits;
_numberText
_numberText;
12 changes: 6 additions & 6 deletions life_server/Functions/MySQL/fn_queryRequest.sqf
Expand Up @@ -11,17 +11,17 @@
ARRAY - If array has 0 elements it should be handled as an error in client-side files.
STRING - The request had invalid handles or an unknown error and is logged to the RPT.
*/
private ["_uid","_side","_query","_queryResult","_tickTime","_tmp"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;
_side = [_this,1,sideUnknown,[civilian]] call BIS_fnc_param;
_ownerID = [_this,2,objNull,[objNull]] call BIS_fnc_param;
private ["_query","_queryResult","_tickTime","_tmp","_new","_old"];
params [
[_uid,"",[""]],
[_side,sideUnknown,[civilian]],
[_ownerID,objNull,[objNull]]
];

if (isNull _ownerID) exitWith {};

if (LIFE_SETTINGS(getNumber,"player_deathLog") isEqualTo 1) then {
_ownerID addMPEventHandler ["MPKilled", {_this call fn_whoDoneIt}];
};

_ownerID = owner _ownerID;

_query = switch (_side) do {
Expand Down
31 changes: 17 additions & 14 deletions life_server/Functions/MySQL/fn_updatePartial.sqf
Expand Up @@ -6,29 +6,32 @@
Takes partial data of a player and updates it, this is meant to be
less network intensive towards data flowing through it for updates.
*/
private ["_uid","_side","_value","_value1","_value2","_mode","_query"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;
_side = [_this,1,sideUnknown,[civilian]] call BIS_fnc_param;
_mode = [_this,3,-1,[0]] call BIS_fnc_param;
private ["_value","_value1","_value2","_query","_bool","_array"];

params [
["_uid","",[""]],
["_side",sideUnknown,[civilian]],
["_mode",-1,[0]]
];

if (_uid isEqualTo "" || _side isEqualTo sideUnknown) exitWith {}; //Bad.
_query = "";

switch (_mode) do {
case 0: {
_value = [_this,2,0,[0]] call BIS_fnc_param;
_value = param [2,0,[0]];
_value = [_value] call DB_fnc_numberSafe;
_query = format ["UPDATE players SET cash='%1' WHERE pid='%2'",_value,_uid];
};

case 1: {
_value = [_this,2,0,[0]] call BIS_fnc_param;
_value = param [2,0,[0]];
_value = [_value] call DB_fnc_numberSafe;
_query = format ["UPDATE players SET bankacc='%1' WHERE pid='%2'",_value,_uid];
};

case 2: {
_value = [_this,2,[],[[]]] call BIS_fnc_param;
_value = param [2,[],[[]]];
//Does something license related but I can't remember I only know it's important?
for "_i" from 0 to count(_value)-1 do {
_bool = [(_value select _i) select 1] call DB_fnc_bool;
Expand All @@ -43,7 +46,7 @@ switch (_mode) do {
};

case 3: {
_value = [_this,2,[],[[]]] call BIS_fnc_param;
_value = param [2,[],[[]]];
_value = [_value] call DB_fnc_mresArray;
switch (_side) do {
case west: {_query = format ["UPDATE players SET cop_gear='%1' WHERE pid='%2'",_value,_uid];};
Expand All @@ -53,30 +56,30 @@ switch (_mode) do {
};

case 4: {
_value = [_this,2,false,[true]] call BIS_fnc_param;
_value = param [2,false,[true]];
_value = [_value] call DB_fnc_bool;
_value2 = [_this,4,[],[[]]] call BIS_fnc_param;
_value2 = param [4,[],[[]]];
_value2 = if (count _value2 isEqualTo 3) then {_value2} else {[0,0,0]};
_value2 = [_value2] call DB_fnc_mresArray;
_query = format ["UPDATE players SET civ_alive='%1', civ_position='%2' WHERE pid='%3'",_value,_value2,_uid];
};

case 5: {
_value = [_this,2,false,[true]] call BIS_fnc_param;
_value = param [2,false,[true]];
_value = [_value] call DB_fnc_bool;
_query = format ["UPDATE players SET arrested='%1' WHERE pid='%2'",_value,_uid];
};

case 6: {
_value1 = [_this,2,0,[0]] call BIS_fnc_param;
_value2 = [_this,4,0,[0]] call BIS_fnc_param;
_value1 = param [2,0,[0]];
_value2 = param [4,0,[0]];
_value1 = [_value1] call DB_fnc_numberSafe;
_value2 = [_value2] call DB_fnc_numberSafe;
_query = format ["UPDATE players SET cash='%1', bankacc='%2' WHERE pid='%3'",_value1,_value2,_uid];
};

case 7: {
_array = [_this,2,[],[[]]] call BIS_fnc_param;
_array = param [_this,2,[],[[]]];
[_uid,_side,_array,0] call TON_fnc_keyManagement;
};
};
Expand Down
26 changes: 14 additions & 12 deletions life_server/Functions/MySQL/fn_updateRequest.sqf
Expand Up @@ -6,17 +6,19 @@
Updates ALL player information in the database.
Information gets passed here from the client side file: core\session\fn_updateRequest.sqf
*/
private ["_uid","_side","_cash","_bank","_licenses","_gear","_stats","_name","_alive","_position","_query","_thread"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;
_name = [_this,1,"",[""]] call BIS_fnc_param;
_side = [_this,2,sideUnknown,[civilian]] call BIS_fnc_param;
_cash = [_this,3,0,[0]] call BIS_fnc_param;
_bank = [_this,4,5000,[0]] call BIS_fnc_param;
_licenses = [_this,5,[],[[]]] call BIS_fnc_param;
_gear = [_this,6,[],[[]]] call BIS_fnc_param;
_stats = [_this,7,[100,100],[[]]] call BIS_fnc_param;
_alive = [_this,9,false,[true]] call BIS_fnc_param;
_position = [_this,10,[],[[]]] call BIS_fnc_param;
private ["_bool","_playtime","_playtime_update","_query"];
params [
["_uid","",[""]],
["_name","",[""]],
["_side",sideUnknown,[civilian]],
["_cash",0,[0]],
["_bank",5000,[0]],
["_licenses",[],[[]]],
["_gear",[],[[]]],
["_stats",[100,100],[[]]],
["_alive",false,[true]],
["_position",[],[[]]]
];

//Get to those error checks.
if ((_uid isEqualTo "") || (_name isEqualTo "")) exitWith {};
Expand Down Expand Up @@ -61,4 +63,4 @@ switch (_side) do {
};


_queryResult = [_query,1] call DB_fnc_asyncCall;
[_query,1] call DB_fnc_asyncCall;
4 changes: 2 additions & 2 deletions life_server/Functions/Systems/fn_cleanupRequest.sqf
Expand Up @@ -7,8 +7,8 @@
the server will then monitor when that client aborts and
delete the weapon holders.
*/
private ["_client","_loops"];
_client = [_this,0,objNull,[objNull]] call BIS_fnc_param;
private ["_client","_loops","_containers"];
_client = param [0,objNull,[objNull]];
if (isNull _client) exitWith {};

_loops = 0;
Expand Down
14 changes: 8 additions & 6 deletions life_server/Functions/Systems/fn_getVehicles.sqf
Expand Up @@ -6,11 +6,13 @@
Description:
Sends a request to query the database information and returns vehicles.
*/
private ["_pid","_side","_type","_unit","_ret","_tickTime","_queryResult"];
_pid = [_this,0,"",[""]] call BIS_fnc_param;
_side = [_this,1,sideUnknown,[west]] call BIS_fnc_param;
_type = [_this,2,"",[""]] call BIS_fnc_param;
_unit = [_this,3,objNull,[objNull]] call BIS_fnc_param;
private ["_tickTime","_queryResult"];
params [
["_pid","",[""]],
["_side",sideUnknown,[west]],
["_type","",[""]],
["_unit",objNull,[objNull]]
];

//Error checks
if (_pid isEqualTo "" || _side isEqualTo sideUnknown || _type isEqualTo "" || isNull _unit) exitWith {
Expand All @@ -27,7 +29,7 @@ _side = switch (_side) do {
default {"Error"};
};

if (_side == "Error") exitWith {
if (_side IsEqualTo "Error") exitWith {
[[]] remoteExec ["life_fnc_impoundMenu",(owner _unit)];
};

Expand Down
6 changes: 3 additions & 3 deletions life_server/Functions/Systems/fn_huntingZone.sqf
Expand Up @@ -10,10 +10,10 @@
Change it up so animals repopulate over time.
*/

private ["_animalList","_dist","_radius","_zoneName","_unitsNear","_animalsActive"];
private ["_animalList","_dist","_radius","_unitsNear","_animalsActive","_zone"];
params [
["_zoneName","",[""]],
["_maxAnimals",10,[0]]
["_zoneName","",[""]],
["_maxAnimals",10,[0]]
];

if (_zoneName isEqualTo "") exitWith {};
Expand Down
17 changes: 10 additions & 7 deletions life_server/Functions/Systems/fn_keyManagement.sqf
Expand Up @@ -5,16 +5,19 @@
Description:
Keeps track of an array locally on the server of a players keys.
*/
private ["_uid","_side","_input","_mode","_arr"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;
_side = [_this,1,sideUnknown,[sideUnknown]] call BIS_fnc_param;
_mode = [_this,3,0,[0]] call BIS_fnc_param;
private ["_input","_arr"];
params [
["_uid","",[""]],
["_side",sideUnknown,[sideUnknown]],
"",
["_mode",0,[0]]
];

if (_uid isEqualTo "" || _side isEqualTo sideUnknown) exitWith {}; //BAAAAAAAAADDDDDDDD

switch (_mode) do {
case 0: {
_input = [_this,2,[],[[]]] call BIS_fnc_param;
_input = param [2,[],[[]]];
_arr = [];
{
if (!isNull _x && {!(_x isKindOf "House")}) then {
Expand All @@ -27,7 +30,7 @@ switch (_mode) do {
};

case 1: {
_input = [_this,2,objNull,[objNull]] call BIS_fnc_param;
_input = param [2,objNull,[objNull]];
if (isNull _input || _input isKindOf "House") exitWith {};
_arr = missionNamespace getVariable [format ["%1_KEYS_%2",_uid,_side],[]];
_arr pushBack _input;
Expand All @@ -40,4 +43,4 @@ switch (_mode) do {
_arr = _arr - [objNull];
missionNamespace setVariable [format ["%1_KEYS_%2",_uid,_side],_arr];
};
};
};