I decided to look at/ play with this script and am having some issues. Well, one.

This line;
Code:
string ICommodity.Description
is throwing an error " 'ICommodity.Description' in explicit interface declaration is not a member of interface.
Being unwilling to crawl through the main code, what is wrong, or more likely, changed?

Hopefully full script is in the spoiler tag. :)


Code:
using System;
using System.Collections;
using Server;
using Server.Network;

namespace Server.Items
{

   public class WinecrafterSugar : Item, ICommodity
   {
     string ICommodity.Description
     {
       get
       {
         return String.Format( Amount == 1 ? "{0} Sugar" : "{0} Sugar", Amount );
       }
     }

     [Constructable]
     public WinecrafterSugar() : this(1)
  {
     }

     [Constructable]
  public WinecrafterSugar(int amount) : base(0xF8F)
     {
       this.Stackable = true;
       this.Hue = 1150;
       this.Name = "a jar of sugar";
       this.ItemID = 4102;
       this.Amount = amount;
       this.Weight = 1;
     }

     public WinecrafterSugar(Serial serial) : base(serial)
     {
     }

     public override void Serialize(GenericWriter writer)
     {
       base.Serialize(writer);
 
change this

  1. public class WinecrafterSugar : Item, ICommodity
  2. {
  3. string ICommodity.Description
  4. {

for

int ICommodity.DescriptionNumber { get { return LabelNumber; } }
bool ICommodity.IsDeedable { get { return true; } }
 
Back