mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Check and Correct Old Vehicle DB array
When hosts upgrade they will have vehicles saved in their DB with the old dataFormat. This check by @He-Man will do the trick to solve this issue moving forward with vehicle upgrades
This commit is contained in:
parent
1e77e0a22b
commit
657d4c7b29
@ -42,7 +42,17 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
|
if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
|
||||||
_arr = _response select 1;
|
_arr = _response select 1;
|
||||||
_arrNum = count _arr;
|
_arrNum = count _arr;
|
||||||
|
|
||||||
|
// New Upgrade System adds to DB array, check and correct older saved vehicles
|
||||||
|
if (_arrNum < _dataFormatCount) then {
|
||||||
|
{
|
||||||
|
_check = _arr select _foreachindex;
|
||||||
|
if (isnil '_check') then {
|
||||||
|
_arr pushback (_dataFormat select _foreachindex);
|
||||||
|
};
|
||||||
|
} foreach _dataFormat;
|
||||||
|
};
|
||||||
|
|
||||||
if (_arrNum == _dataFormatCount) then {
|
if (_arrNum == _dataFormatCount) then {
|
||||||
|
|
||||||
// Validate and replace invaild data
|
// Validate and replace invaild data
|
||||||
|
Loading…
Reference in New Issue
Block a user