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

@@ -2,7 +2,7 @@ disableSerialization;
Z_traderData = (_this select 3); // gets the trader data ( e.g menu_Functionary1 )
if (isNil "Z_traderData" || count (Z_traderData) == 0) exitWith {
if (isNil "Z_traderData" or {count Z_traderData == 0}) exitWith {
localize "STR_EPOCH_TRADE_ERROR" call dayz_rollingMessages;
};