Localize sell and buy only messages

PrimaryWeapon always returns "", never nil unless the player object
isNull (in which case this script would not be running).

Fixed cases where a nil variable would throw an error when checking the
next condition.
This commit is contained in:
ebaydayz
2016-09-09 13:53:20 -04:00
parent e5e212bbc2
commit 8f25cc70db
12 changed files with 28 additions and 22 deletions

View File

@@ -39,7 +39,7 @@ if (_selection == 2) then { //gear
_allowedRegularMags = 12 - _regularMags;
_p = primaryWeapon player;
_allowedPrimary = if (!isNil "_p" && _p != "") then {0} else {1};
_allowedPrimary = if (_p != "") then {0} else {1};
if (DZE_TwoPrimaries == 2 && dayz_onBack == "") then { _allowedPrimary = _allowedPrimary + 1; };
_b = unitBackpack player;