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

@@ -211,7 +211,7 @@ if (_enoughMoney) then {
_count = 0;
while {_count < (_x select 9)} do {
_p = primaryWeapon player;
_hasPrimary = if (!isNil "_p" && _p != "") then {true} else {false};
_hasPrimary = if (_p != "") then {true} else {false};
if (_hasPrimary && getNumber (configFile >> "CfgWeapons" >> (_x select 0) >> "type") == 1) then {
dayz_onBack = _x select 0; //Add to back
} else {