RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Vampire monster problem!

daat99

Moderator
Staff member
Whooper7777 said:
i know that there is mayby this missing } or { but just cant find the place
Code:
- Error: Scripts\Customs\Artifacts\VialofBlood.cs: CS1513: [color=red](line 40,[/color] column 4)
} expected
That's where you need to start looking.

Also you might want to download a free program called SharpDevelop, it'll help you A LOT finding and fixing problems like this.

Just think of how much time you'll save for yourself if you find the problem 2 minutes after you get the error or if you post it which takes 2 minutes and then wait unknown amount of time for someone to reply.
 

Murzin

Knight
Code:
		public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 3.0 ); } }		 
      		}

excess brace here... and im not sure that will work... im pretty sure you have to do it another way.
 

Whooper7777

Wanderer
i got fixed first of my errors just only strange problems more there they are:
Code:
- Error: Scripts\Customs\Artifacts\VialofBlood.cs: CS1518: (line 46, column 16)
 Expected class, delegate, enum, interface, or struct
 - Error: Scripts\Customs\Artifacts\VialofBlood.cs: CS1518: (line 50, column 25)
 Expected class, delegate, enum, interface, or struct
 - Error: Scripts\Customs\Artifacts\VialofBlood.cs: CS1518: (line 57, column 25)
 Expected class, delegate, enum, interface, or struct
 - Error: Scripts\Customs\Artifacts\VialofBlood.cs: CS1022: (line 64, column 1)
Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

Whooper7777

Wanderer
here:
Code:
using System; 
using Server; 

namespace Server.Items 
{ 

   	public class VialofBlood : BaseItem 
   	{ 

      		[Constructable] 
      		public VialofBlood() 
      		{ 
          		Name = "Vial of Blood";
         		ItemID = 3620;
         		Weight = 3.0;
       			Hue = 2671;
       
     		 }

      		public override void OnDoubleClick( Mobile from ) 
     		{ 
                        string modName = m.Serial.ToString();
			StatMod smod = m.GetStatMod( "Str" );
                        StatMod dmod = m.GetStatMod( "Dex" );
                        StatMod imod = m.GetStatMod( "Int" );
                        if ( smod != null && imod != null && dmod != null)
			{
                                m.SendMessage( "You applied blood to your own blood!" );
			}
			else if (smod == null && imod == null && dmod == null)
			{
				m.AddStatMod( new StatMod( StatType.Int, modName + "Int", 20, TimeSpan.FromMinutes( 5 ) ) );
                                m.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", 20, TimeSpan.FromMinutes( 5 ) ) );
                                m.AddStatMod( new StatMod( StatType.Str, modName + "Str", 20, TimeSpan.FromMinutes( 5 ) ) );
                                m.Hits = m.HitsMax ;
                                m.Mana = m.ManaMax ;
                                m.Stam = m.StamMax ;
				this.Delete();
                                m.SendMessage( "You feel Super!" );
			}
		}

		public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 3.0 ); } }		 
      		} 


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

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

         		writer.Write( (int) 0 ); 
      		} 
       
      		public override void Deserialize(GenericReader reader) 
      		{ 
         		base.Deserialize( reader ); 

         		int version = reader.ReadInt(); 
      		} 
   	}     
}
 

UOT

Knight
Here
Code:
		public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 3.0 ); } }		 
      		}
you got the bracket in the wrong spot should be
Code:
}		public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 3.0 ); } }
Are you sure you are using #develope? Most of these error can easily be seen if you were.
 

Rift

Wanderer
Okay that vialofblood is loaded with lots of errors to many to even try to explain all the faults here is working vialofblood script compare to your old one and see all the changes that was needed to make it work any questions ask why it needed changed sure me or others can give you a clue....

Code:
using System; 
using Server;
using Server.Items;

namespace Server.Items 
{ 

   	public class VialofBlood : Item 
   	{ 

      		[Constructable] 
      		public VialofBlood() 
      		{ 
          		Name = "Vial of Blood";
         		ItemID = 3620;
         		Weight = 3.0;
       			Hue = 2671;
       
     		 }

      		public override void OnDoubleClick( Mobile from ) 
     		{ 
                        string modName = from.Serial.ToString();
			StatMod smod = from.GetStatMod( "Str" );
                        StatMod dmod = from.GetStatMod( "Dex" );
                        StatMod imod = from.GetStatMod( "Int" );
                        if ( smod != null && imod != null && dmod != null)
			{
                                from.SendMessage( "You applied blood to your own blood!" );
			}
			else if (smod == null && imod == null && dmod == null)
			{
				from.AddStatMod( new StatMod( StatType.Int, modName + "Int", 20, TimeSpan.FromMinutes( 5 ) ) );
                                from.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", 20, TimeSpan.FromMinutes( 5 ) ) );
                                from.AddStatMod( new StatMod( StatType.Str, modName + "Str", 20, TimeSpan.FromMinutes( 5 ) ) );
                                from.Hits = from.HitsMax;
                                from.Mana = from.ManaMax;
                                from.Stam = from.StamMax;
				this.Delete();
                                from.SendMessage( "You feel Super!" );
			}
		}

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

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

         		writer.Write( (int) 0 ); 
      		} 
       
      		public override void Deserialize(GenericReader reader) 
      		{ 
         		base.Deserialize( reader ); 

         		int version = reader.ReadInt(); 
      		} 
   	}     
}
 
Top