mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Fix undefined variable when SingleCurrency is not used
This commit is contained in:
@@ -98,14 +98,12 @@ if (Z_SingleCurrency) then {
|
|||||||
_canBuy = [_weaponsToBuy,[_pistolMagsToBuy,_regularMagsToBuy],_backpacksToBuy,_toolsToBuy,_sidearmToBuy,_primaryToBuy,_vehiclesToBuy,_toolClasses,_toolAmounts] call Z_allowBuying;
|
_canBuy = [_weaponsToBuy,[_pistolMagsToBuy,_regularMagsToBuy],_backpacksToBuy,_toolsToBuy,_sidearmToBuy,_primaryToBuy,_vehiclesToBuy,_toolClasses,_toolAmounts] call Z_allowBuying;
|
||||||
if (!_canBuy) exitWith {}; // Keep systemChat reasons for failure in Z_allowBuying for sanity
|
if (!_canBuy) exitWith {}; // Keep systemChat reasons for failure in Z_allowBuying for sanity
|
||||||
|
|
||||||
_wealth = player getVariable[(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
|
||||||
|
|
||||||
_enoughMoney = false;
|
_enoughMoney = false;
|
||||||
|
|
||||||
_moneyInfo = [false, [], [], [], 0];
|
_moneyInfo = [false, [], [], [], 0];
|
||||||
|
|
||||||
if (Z_SingleCurrency) then {
|
if (Z_SingleCurrency) then {
|
||||||
_enoughMoney = (_wealth >= _priceToBuy);
|
_wealth = player getVariable[(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
||||||
|
_enoughMoney = (_wealth >= _priceToBuy);
|
||||||
} else {
|
} else {
|
||||||
_moneyInfo = _priceToBuy call Z_canAfford;
|
_moneyInfo = _priceToBuy call Z_canAfford;
|
||||||
_enoughMoney = _moneyInfo select 0;
|
_enoughMoney = _moneyInfo select 0;
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ if (_disabled) exitWith {[_reason,1] call dayz_rollingMessages};
|
|||||||
|
|
||||||
_enoughMoney = false;
|
_enoughMoney = false;
|
||||||
_moneyInfo = [false, [], [], [], 0];
|
_moneyInfo = [false, [], [], [], 0];
|
||||||
_wealth = player getVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
|
||||||
|
|
||||||
if (Z_SingleCurrency) then {
|
if (Z_SingleCurrency) then {
|
||||||
|
_wealth = player getVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
||||||
_enoughMoney = (_wealth >= _amount);
|
_enoughMoney = (_wealth >= _amount);
|
||||||
} else {
|
} else {
|
||||||
Z_Selling = false;
|
Z_Selling = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user