From d8e6ddf13b557e478c88f4f5eb30272bc1c5a082 Mon Sep 17 00:00:00 2001 From: Rodrigo Fraga Date: Sun, 6 Jul 2014 02:08:02 -0400 Subject: [PATCH] Fix compile error CS0165 on Mono When running on mono building scripts, it will yield Errors: + Engines/BulkOrders/SmallTailorBOD.cs: CS0165: Line 88: Use of unassigned local variable `useMaterials' Calling RandomBool out of if --- Scripts/Engines/BulkOrders/SmallTailorBOD.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Engines/BulkOrders/SmallTailorBOD.cs b/Scripts/Engines/BulkOrders/SmallTailorBOD.cs index 8de2c1b44..8f3a6b1a9 100644 --- a/Scripts/Engines/BulkOrders/SmallTailorBOD.cs +++ b/Scripts/Engines/BulkOrders/SmallTailorBOD.cs @@ -64,10 +64,10 @@ namespace Server.Engines.BulkOrders public static SmallTailorBOD CreateRandomFor( Mobile m ) { SmallBulkEntry[] entries; - bool useMaterials; + bool useMaterials = Utility.RandomBool(); double theirSkill = m.Skills[SkillName.Tailoring].Base; - if ( useMaterials = Utility.RandomBool() && theirSkill >= 6.2 ) // Ugly, but the easiest leather BOD is Leather Cap which requires at least 6.2 skill. + if ( useMaterials && theirSkill >= 6.2 ) // Ugly, but the easiest leather BOD is Leather Cap which requires at least 6.2 skill. entries = SmallBulkEntry.TailorLeather; else entries = SmallBulkEntry.TailorCloth;