Redmoon
Member
I'm trying to make gold dust, and am getting this crash:
Here is the simple GoldDust.cs (no problems adding it IG)
And the DefAlchemy.cs:
I'm thinking it has something to do with this in the Gold.cs:
Code:
Server Crash Report
===================
RunUO Version 0.5, Build 5151.20665
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 4.0.30319.18444
Time: 2/19/2014 3:46:19 PM
Mobiles: 43317
Items: 236651
Exception:
System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Server.Engines.Craft.CraftItem.CompleteCraft(Int32 quality, Boolean makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CustomCraft customCraft)
at Server.Engines.Craft.CraftItem.InternalTimer.OnTick()
at Server.Timer.Slice() in c:\Reds Domain Pub 54\Server\Timer.cs:line 387
at Server.Core.Main(String[] args) in c:\Reds Domain Pub 54\Server\Main.cs:line 622
Here is the simple GoldDust.cs (no problems adding it IG)
Code:
using System;
using Server.Items;
using Server.Network;
namespace Server.Items
{
public class GoldDust : Item
{
[Constructable]
public GoldDust(int amount) : base(0x4C09)
{
Name = "Gold Dust";
Stackable = true;
Hue = 1161;//get hue
Weight = 1.0;
Amount = amount;
}
public GoldDust(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
And the DefAlchemy.cs:
Code:
index = this.AddCraft(typeof(GoldDust), 1098336, 1098337, 90.0, 120.0, typeof(Gold), 3000083, 1000, 1150747);
this.SetNeededExpansion(index, Expansion.SA);
I'm thinking it has something to do with this in the Gold.cs:
Code:
public Gold(int amountFrom, int amountTo)
: this(Utility.RandomMinMax(amountFrom, amountTo))