CODE |
using System; using Server; using Server.Items; namespace Server.Items { public class TreasureChestOfOzzyStuff : Container { public override int DefaultGumpID{ get{ return 0x42; } } public override int DefaultDropSound{ get{ return 0x42; } } public override Rectangle2D Bounds { get{ return new Rectangle2D( 20, 105, 150, 180 ); } } [Constructable] public TreasureChestOfOzzyStuff() : base( 0xE41 ) { Name = "Treasure Chest Of Ozzy's Stuff"; Hue = 1266; PlaceItemIn( cont, 16, 51, new TreasureChestOfOzzyArmor() ); PlaceItemIn( cont, 28, 51, new TreasureChestOfOzzyWeaponsandShields() ); } public TreasureChestOfOzzyStuff( 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(); } } } |
CODE |
- Error: Scripts\New Stuff\TreasureChestOfOzzyStuff.cs: CS0103: (line 24, colum n 17) The name 'cont' does not exist in the class or namespace 'Server.Items.Tre asureChestOfOzzyStuff' - Error: Scripts\New Stuff\TreasureChestOfOzzyStuff.cs: CS0103: (line 24, colum n 4) The name 'PlaceItemIn' does not exist in the class or namespace 'Server.Ite ms.TreasureChestOfOzzyStuff' - Error: Scripts\New Stuff\TreasureChestOfOzzyStuff.cs: CS0103: (line 25, colum n 17) The name 'cont' does not exist in the class or namespace 'Server.Items.Tre asureChestOfOzzyStuff' - Error: Scripts\New Stuff\TreasureChestOfOzzyStuff.cs: CS0103: (line 25, colum n 4) The name 'PlaceItemIn' does not exist in the class or namespace 'Server.Ite ms.TreasureChestOfOzzyStuff' Scripts: One or more scripts failed to compile or no script files were found. - Press return to exit, or R to try again. |
CODE |
PlaceItemIn( cont, 16, 51, new TreasureChestOfOzzyArmor() ); PlaceItemIn( cont, 28, 51, new TreasureChestOfOzzyWeaponsandShields() ); [CODE] To this. |
CODE |
Then added this. |
CODE |
I still get these 2 errors thow. |
CODE |
//=========================Created By Ozzy===================================// using System; using Server; using Server.Gumps; using Server.Items; namespace Server.Items { public class TreasureChestOfOzzyStuff : Container { public override int DefaultGumpID{ get{ return 0x42; } } public override int DefaultDropSound{ get{ return 0x42; } } public override Rectangle2D Bounds { get{ return new Rectangle2D( 20, 105, 150, 180 ); } } [Constructable] public TreasureChestOfOzzyStuff() : base( 0xE41 ) { Name = "Treasure Chest Of Ozzy's Stuff"; Container cont; Hue = 1266; this( cont, 16, 51, new TreasureChestOfOzzyArmor() ); this( cont, 28, 51, new TreasureChestOfOzzyWeaponsandShields() ); } public TreasureChestOfOzzyStuff( 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(); } } } |
CODE |
- Error: Scripts\New Stuff\TreasureChestOfOzzyStuff.cs: CS0149: (line 31, colum n 4) Method name expected - Error: Scripts\New Stuff\TreasureChestOfOzzyStuff.cs: CS0149: (line 32, colum n 4) Method name expected |
CODE |
Container cont; Hue = 1266; this( cont, 16, 51, new TreasureChestOfOzzyArmor() ); this( cont, 28, 51, new TreasureChestOfOzzyWeaponsandShields() ); |
CODE |
Item armor = new TreasureChestOfOzzyArmor(); AddItem(armor); armor.Location = new Point3D(16, 51, 0); Item shield = new TreasureChestOfOzzyWeaponsandShields(); AddItem(shield ); shield .Location = new Point3D(28, 51, 0); |
CODE |
private static void PlaceItemIn( Container parent, int x, int y, Item item ) { parent.AddItem( item ); item.Location = new Point3D( x, y, 0 ); } [Constructable] public TreasureChestOfOzzysStuff() : base( 0xE41 ) { Name = "Treasure Chest Of Ozzy's Stuff"; Hue = 0; PlaceItemIn( this, 20, 105, new PouchOfOzzysPlateArmor() ); PlaceItemIn( this, 35, 105, new PouchOfOzzysChainArmor() ); PlaceItemIn( this, 50, 105, new PouchOfOzzysRingArmor() ); } |