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!

Same Parameter Types Error

Krystyl_Rose

Wanderer
Same Parameter Types Error

I never fail to amaze myself with the new errors I can manage to get the console to give me... LOL

Ok here is what I am doing... I havent been able to find a fully working ethereal deed script so I am making my own (or attempting to anyway) I have managed to get the deed itself squared away, but the gump is giving me errors... first it was telling me that it expected an end of file, but I have managed to fix that (I think), now it is giving me this error instead:
Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Customs\MountDeed\EtherealDeed.cs: CS0111: (line 17, column 4)
 Class 'Server.Items.EtherealMountDeed' already defines a member called 'Etherea
lMountDeed' with the same parameter types
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

and heres what I have right now for the script
Code:
using System; 
using System.Net; 
using Server; 
using Server.Accounting; 
using Server.Gumps;
using Server.Items;
using Server.Mobiles; 
using Server.Network; 

namespace Server.Gumps
{ 
	public class EtherealMountGump : Gump
   { 
      private Mobile m_Mobile;
      private Item m_Deed;

      public EtherealMountGump( Mobile from, Item deed ) : base( 30, 20 ) 
      { 
     m_Mobile = from;
	 m_Deed = deed; 

	 AddPage( 1 ); 

	 AddBackground( 0, 0, 300, 400, 5054 ); 
	 AddBackground( 8, 8, 284, 384, 3000 ); 

	 AddLabel( 40, 12, 0, "Ethereal List" ); 

	 Account a = from.Account as Account; 

	 AddLabel( 52, 40, 0, "Ethereal Horse" ); 
	 AddButton( 12, 40, 4005, 4007, 1, GumpButtonType.Reply, 1 ); 
	 AddLabel( 52, 60, 0, "Ethereal Llama" ); 
	 AddButton( 12, 60, 4005, 4007, 2, GumpButtonType.Reply, 2 ); 
	 AddLabel( 52, 80, 0, "Etheral Ostard" ); 
	 AddButton( 12, 80, 4005, 4007, 3, GumpButtonType.Reply, 3 ); 
	 AddLabel( 52, 340, 0, "Etheral Ridgeback" ); 
	 AddButton( 12, 100, 4005, 4007, 4, GumpButtonType.Reply, 4 ); 
	 AddLabel( 52, 120, 0, "Ethereal Unicorn" ); 
	 AddButton( 12, 120, 4005, 4007, 5, GumpButtonType.Reply, 5 ); 
	 AddLabel( 52, 140, 0, "Ethereal Beetle" ); 
	 AddButton( 12, 140, 4005, 4007, 6, GumpButtonType.Reply, 6 ); 
	 AddLabel( 52, 160, 0, "Ethereal Ki-Rin" ); 
	 AddButton( 12, 160, 4005, 4007, 7, GumpButtonType.Reply, 7 ); 
	 AddLabel( 52, 180, 0, "Ethereal Swamp Dragon" ); 
	 AddButton( 12, 180, 4005, 4007, 8, GumpButtonType.Reply, 8 ); 
	 AddLabel( 52, 200, 0, "Ethereal Hiryu" ); 
	 AddButton( 12, 200, 4005, 4007, 9, GumpButtonType.Reply, 9 ); 
	 AddLabel( 52, 220, 0, "Close" ); 
	 AddButton( 12, 220, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
      }

		public override void OnResponse( NetState state, RelayInfo info )
      { 
		Mobile from = state.Mobile;
		switch ( info.ButtonID )
		{
			case 0: //Close Gump 
			{
			from.CloseGump( typeof( EtherealMountGump ) ); 
			break; 
	    } 
	    case 1: // Ethereal Horse
	    { 
	       Item item = new EtherealHorse();
	       from.SendMessage( "An Ethereal Horse has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       m_Deed.Delete();
	       goto case 0; 
	    } 
	    case 2: // Ethereal Llama 
	    { 
	       Item item = new EtherealLlama();
	       from.SendMessage( "An Ethereal Llama has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       m_Deed.Delete();
	       goto case 0;
	    } 
	    case 3: // Ethereal Ostard
	    { 
	       Item item = new EtherealOstard();
           from.SendMessage( "An Ethereal Ostard has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       m_Deed.Delete();
	       goto case 0;
	    } 
	    case 4: // Ethereal Ridgeback
	   	{ 
	       Item item = new EtherealRidgeback();
	       from.SendMessage( "An Ethereal Ridgeback has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       m_Deed.Delete();
	       goto case 0;
	    } 
	    case 5: // Ethereal Unicorn
	    { 
	       Item item = new EtherealUnicorn();
	       from.SendMessage( "An Ethereal Unicorn has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       m_Deed.Delete();
	       goto case 0;
	    } 
	    case 6: //Ethereal Beetle
	    { 
	       Item item = new EtherealBeetle();
	       from.SendMessage( "An Ethereal Beetle has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       m_Deed.Delete();
	       goto case 0;
	    } 
	    case 7: //Ethereal Ki-Rin
	    { 
	       Item item = new EtherealKirin();
	       from.SendMessage( "An Ethereal Ki-Rin has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       m_Deed.Delete();
	       goto case 0; 
	    } 
	    case 8: //Ethereal Swamp Dragon
	    { 
	       Item item = new EtherealSwampDragon();
	       from.SendMessage( "An Ethereal Swamp Dragon has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       m_Deed.Delete();
	       goto case 0;
	    }
	    case 9: //Ethereal Hiryu
	    { 
	       Item item = new EtherealHiryu();
	       from.SendMessage( "An Ethereal Hiryu has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       m_Deed.Delete();
	       goto case 0;
           } 
         }
      }
   }
}

what am I doing wrong? I have compared it to other scripts (granted the other scripts arent for the same thing so a good comparison is hard to do, but I WAS trying)
 

daat99

Moderator
Staff member
Krystyl_Rose said:
I never fail to amaze myself with the new errors I can manage to get the console to give me... LOL

Ok here is what I am doing... I havent been able to find a fully working ethereal deed script so I am making my own (or attempting to anyway) I have managed to get the deed itself squared away, but the gump is giving me errors... first it was telling me that it expected an end of file, but I have managed to fix that (I think), now it is giving me this error instead:
Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Customs\MountDeed\EtherealDeed.cs: CS0111: (line 17, column 4)
 Class 'Server.Items.EtherealMountDeed' already defines a member called 'Etherea
lMountDeed' with the same parameter types
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

what am I doing wrong? I have compared it to other scripts (granted the other scripts arent for the same thing so a good comparison is hard to do, but I WAS trying)

Like the error says:
Class 'Server.Items.EtherealMountDeed' already defines a member called 'EtherealMountDeed' with the same parameter types
You have 2 constructors of EtherealMountDeed that use the same parameters as an arguments.
Either delete 1 of them, change 1 of the parameters or merge them both into 1 constructor.
 

Krystyl_Rose

Wanderer
I understood the error, what I dont understand is how to fix it... I'm still very much a beginner here.

I believe what the error is telling me is that
public class EtherealMountGump : Gump
public EtherealMountGump( Mobile from, Item deed ) : base( 30, 20 )

are defining the same thing, and I understand that you are telling me to eliminate one or the other (and their associated lines) or to merge them.... what I DO NOT understand is how to do so... I think I am lost on this one, I tried deleteing one and got the same error... so I put it back and tried the other... same thing... I have also tried merging them but I always seem to get this same error... so I am guessing that I am either way off base on the meaning of the error... or else I am not fixing it correctly (yes I know that it is rather obvious that I am not fixing it correctly)....
 

Phantom

Knight
Krystyl_Rose said:
I understood the error, what I dont understand is how to fix it... I'm still very much a beginner here.

I believe what the error is telling me is that
public class EtherealMountGump : Gump
public EtherealMountGump( Mobile from, Item deed ) : base( 30, 20 )

are defining the same thing, and I understand that you are telling me to eliminate one or the other (and their associated lines) or to merge them.... what I DO NOT understand is how to do so... I think I am lost on this one, I tried deleteing one and got the same error... so I put it back and tried the other... same thing... I have also tried merging them but I always seem to get this same error... so I am guessing that I am either way off base on the meaning of the error... or else I am not fixing it correctly (yes I know that it is rather obvious that I am not fixing it correctly)....

Do what you want, but you can only have one.
 

daat99

Moderator
Staff member
Krystyl_Rose said:
I understood the error, what I dont understand is how to fix it... I'm still very much a beginner here.

I believe what the error is telling me is that
public class EtherealMountGump : Gump
public EtherealMountGump( Mobile from, Item deed ) : base( 30, 20 )

are defining the same thing, and I understand that you are telling me to eliminate one or the other (and their associated lines) or to merge them.... what I DO NOT understand is how to do so... I think I am lost on this one, I tried deleteing one and got the same error... so I put it back and tried the other... same thing... I have also tried merging them but I always seem to get this same error... so I am guessing that I am either way off base on the meaning of the error... or else I am not fixing it correctly (yes I know that it is rather obvious that I am not fixing it correctly)....
You can't get the same error if you deleted 1.
Please post what you tried and the new error (even if you think it's the same).
 

Krystyl_Rose

Wanderer
ok I seem to have fixed the parameters problem but only to run into 60 more errors... I cant seem to figure out what it is I am doing wrong.

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (60 errors, 0 warnings)
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 17, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 17, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 19, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 19, colum
n 18) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 20, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 20, colum
n 18) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 22, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 22, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 24, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 24, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 25, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 25, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 25, colum
n 57) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 26, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 26, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 27, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 27, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 27, colum
n 57) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 28, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 28, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 29, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 29, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 29, colum
n 57) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 30, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 30, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 31, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 31, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 31, colum
n 58) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 32, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 32, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 33, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 33, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 33, colum
n 58) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 34, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 34, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 35, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 35, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 35, colum
n 58) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 36, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 36, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 37, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 37, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 37, colum
n 58) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 38, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 38, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 39, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 39, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 39, colum
n 58) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 40, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 40, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 41, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 41, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 41, colum
n 58) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 42, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 42, colum
n 13) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1520: (line 43, colum
n 3) Class, struct, or interface method must have a return type
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1031: (line 43, colum
n 14) Type expected
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1519: (line 43, colum
n 58) Invalid token ',' in class, struct, or interface member declaration
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1518: (line 46, colum
n 18) Expected class, delegate, enum, interface, or struct
 - Error: Scripts\Customs\MountDeed\EtherealDeedGump.cs: CS1022: (line 150, colu
mn 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.

SCRIPT
Code:
using System;
using System.Net;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Network; 

namespace Server.Gumps
{ 
	public class EtherealMountGump : Gump 
	{ 
		private Mobile m_Mobile;
		private Item m_Deed;


		AddPage ( 1 );
		
	 AddBackground( 0, 0, 300, 400, 5054 ); 
	 AddBackground( 8, 8, 284, 384, 3000 ); 

	 AddLabel( 40, 12, 0, "Ethereal List" ); 

	 AddLabel( 52, 40, 0, "Ethereal Horse" ); 
	 AddButton( 12, 40, 4005, 4007, 1, GumpButtonType.Reply, 1 ); 
	 AddLabel( 52, 60, 0, "Ethereal Llama" ); 
	 AddButton( 12, 60, 4005, 4007, 2, GumpButtonType.Reply, 2 ); 
	 AddLabel( 52, 80, 0, "Etheral Ostard" ); 
	 AddButton( 12, 80, 4005, 4007, 3, GumpButtonType.Reply, 3 ); 
	 AddLabel( 52, 340, 0, "Etheral Ridgeback" ); 
	 AddButton( 12, 100, 4005, 4007, 4, GumpButtonType.Reply, 4 ); 
	 AddLabel( 52, 120, 0, "Ethereal Unicorn" ); 
	 AddButton( 12, 120, 4005, 4007, 5, GumpButtonType.Reply, 5 ); 
	 AddLabel( 52, 140, 0, "Ethereal Beetle" ); 
	 AddButton( 12, 140, 4005, 4007, 6, GumpButtonType.Reply, 6 ); 
	 AddLabel( 52, 160, 0, "Ethereal Ki-Rin" ); 
	 AddButton( 12, 160, 4005, 4007, 7, GumpButtonType.Reply, 7 ); 
	 AddLabel( 52, 180, 0, "Ethereal Swamp Dragon" ); 
	 AddButton( 12, 180, 4005, 4007, 8, GumpButtonType.Reply, 8 ); 
	 AddLabel( 52, 200, 0, "Ethereal Hiryu" ); 
	 AddButton( 12, 200, 4005, 4007, 9, GumpButtonType.Reply, 9 ); 
	 AddLabel( 52, 220, 0, "Close" ); 
	 AddButton( 12, 220, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
      }

	public override void OnResponse( NetState state, RelayInfo info )
      { 
		Mobile from = state.Mobile;
         BaseCreature mount;
		switch ( info.ButtonID )
		{
			case 0: //Close Gump 
			{
			from.CloseGump( typeof( EtherealMountGump ) ); 
			break; 
	    } 
	    case 1: // Ethereal Horse
	    { 
	       Item item = new EtherealHorse();
	       from.SendMessage( "An Ethereal Horse has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 2: // Ethereal Llama 
	    { 
	       Item item = new EtherealLlama();
	       from.SendMessage( "An Ethereal Llama has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 3: // Ethereal Ostard
	    { 
	       Item item = new EtherealOstard();
           from.SendMessage( "An Ethereal Ostard has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 4: // Ethereal Ridgeback
	   	{ 
	       Item item = new EtherealRidgeback();
	       from.SendMessage( "An Ethereal Ridgeback has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 5: // Ethereal Unicorn
	    { 
	       Item item = new EtherealUnicorn();
	       from.SendMessage( "An Ethereal Unicorn has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 6: //Ethereal Beetle
	    { 
	       Item item = new EtherealBeetle();
	       from.SendMessage( "An Ethereal Beetle has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 7: //Ethereal Ki-Rin
	    { 
	       Item item = new EtherealKirin();
	       from.SendMessage( "An Ethereal Ki-Rin has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 8: //Ethereal Swamp Dragon
	    { 
	       Item item = new EtherealSwampDragon();
	       from.SendMessage( "An Ethereal Swamp Dragon has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    }
	    case 9: //Ethereal Hiryu
	    { 
	       Item item = new EtherealHiryu();
	       from.SendMessage( "An Ethereal Hiryu has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
           } 
         }
      }
   }
}
 
:( Gumps are really difficult. Look at easy gumps and you will see, what you did wrong, or take this hint:
Code:
	public class MaybeAnotherEtherealMountGump : Gump
	{ 
		private Mobile m_Mobile;
		private Item m_Deed;

		public MaybeAnotherEtherealMountGump( Mobile from, Item deed ) : base( 30, 20 ) 
		{
			m_Mobile = from;
			m_Deed = deed;

			AddPage ( 1 );
 

Krystyl_Rose

Wanderer
I appreciate the attempt to help Kamuflaro, but if you read the code from the first post that code was what gave me the first error :( now I have gotten past it and run into more errors.


is there a tutorial somewhere that I can read that explains ONLY gumps? I have read other tutorials but I have to admit this gump thing has got me a little confused. I thought I understood it until I started getting more and more errors...


*edit* I also HAVE searched google for tutorials of this nature but there seems to be nothing that specific
 

Packer898

Knight
Krystyl_Rose said:
I appreciate the attempt to help Kamuflaro, but if you read the code from the first post that code was what gave me the first error :( now I have gotten past it and run into more errors.


is there a tutorial somewhere that I can read that explains ONLY gumps? I have read other tutorials but I have to admit this gump thing has got me a little confused. I thought I understood it until I started getting more and more errors...


*edit* I also HAVE searched google for tutorials of this nature but there seems to be nothing that specific

Actually no he is telling you what is currently wrong with post #6 yougump is not defined right.
Code:
namespace Server.Gumps
{ 
	public class EtherealMountGump : Gump 
	{ 
		private Mobile m_Mobile;
		private Item m_Deed;


		AddPage ( 1 );

Is not correct it should look like this...
Code:
namespace Server.Gumps
{ 
	public class MaybeAnotherEtherealMountGump : Gump
	{ 
		private Mobile m_Mobile;
		private Item m_Deed;

		public MaybeAnotherEtherealMountGump( Mobile from, Item deed ) : base( 30, 20 ) 
		{
			m_Mobile = from;
			m_Deed = deed;

			AddPage ( 1 );
 

Krystyl_Rose

Wanderer
I had exactly that code in (with the exception of the "maybeanother" part) and it gave me that same perameter error... I see that in all the others and wondered why I couldnt use it... but no matter how I try it gives me that perameter error... I will readd that code and restart and give you the error exactly as it comes out, but I am very lost as to why I cannot make this work.... :(
 

Krystyl_Rose

Wanderer
ok here is the error and the script.... where did I go wrong????



Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Customs\MountDeed\EtherealDeed.cs: CS0111: (line 17, column 4)
 Class 'Server.Items.EtherealMountDeed' already defines a member called 'Etherea
lMountDeed' with the same parameter types
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

SCRIPT
Code:
using System;
using System.Net;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Network; 

namespace Server.Gumps
{ 
	public class EtherealMountGump : Gump
	{ 
		private Mobile m_Mobile;
		private Item m_Deed;

		public EtherealMountGump( Mobile from, Item deed ) : base( 30, 20 ) 
		{
			m_Mobile = from;
			m_Deed = deed;

			AddPage ( 1 );
		
	 AddBackground( 0, 0, 300, 400, 5054 ); 
	 AddBackground( 8, 8, 284, 384, 3000 ); 

	 AddLabel( 40, 12, 0, "Ethereal List" ); 

	 AddLabel( 52, 40, 0, "Ethereal Horse" ); 
	 AddButton( 12, 40, 4005, 4007, 1, GumpButtonType.Reply, 1 ); 
	 AddLabel( 52, 60, 0, "Ethereal Llama" ); 
	 AddButton( 12, 60, 4005, 4007, 2, GumpButtonType.Reply, 2 ); 
	 AddLabel( 52, 80, 0, "Etheral Ostard" ); 
	 AddButton( 12, 80, 4005, 4007, 3, GumpButtonType.Reply, 3 ); 
	 AddLabel( 52, 340, 0, "Etheral Ridgeback" ); 
	 AddButton( 12, 100, 4005, 4007, 4, GumpButtonType.Reply, 4 ); 
	 AddLabel( 52, 120, 0, "Ethereal Unicorn" ); 
	 AddButton( 12, 120, 4005, 4007, 5, GumpButtonType.Reply, 5 ); 
	 AddLabel( 52, 140, 0, "Ethereal Beetle" ); 
	 AddButton( 12, 140, 4005, 4007, 6, GumpButtonType.Reply, 6 ); 
	 AddLabel( 52, 160, 0, "Ethereal Ki-Rin" ); 
	 AddButton( 12, 160, 4005, 4007, 7, GumpButtonType.Reply, 7 ); 
	 AddLabel( 52, 180, 0, "Ethereal Swamp Dragon" ); 
	 AddButton( 12, 180, 4005, 4007, 8, GumpButtonType.Reply, 8 ); 
	 AddLabel( 52, 200, 0, "Ethereal Hiryu" ); 
	 AddButton( 12, 200, 4005, 4007, 9, GumpButtonType.Reply, 9 ); 
	 AddLabel( 52, 220, 0, "Close" ); 
	 AddButton( 12, 220, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
      }

	public override void OnResponse( NetState state, RelayInfo info )
      { 
		Mobile from = state.Mobile;
         BaseCreature mount;
		switch ( info.ButtonID )
		{
			case 0: //Close Gump 
			{
			from.CloseGump( typeof( EtherealMountGump ) ); 
			break; 
	    } 
	    case 1: // Ethereal Horse
	    { 
	       Item item = new EtherealHorse();
	       from.SendMessage( "An Ethereal Horse has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 2: // Ethereal Llama 
	    { 
	       Item item = new EtherealLlama();
	       from.SendMessage( "An Ethereal Llama has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 3: // Ethereal Ostard
	    { 
	       Item item = new EtherealOstard();
           from.SendMessage( "An Ethereal Ostard has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 4: // Ethereal Ridgeback
	   	{ 
	       Item item = new EtherealRidgeback();
	       from.SendMessage( "An Ethereal Ridgeback has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 5: // Ethereal Unicorn
	    { 
	       Item item = new EtherealUnicorn();
	       from.SendMessage( "An Ethereal Unicorn has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 6: //Ethereal Beetle
	    { 
	       Item item = new EtherealBeetle();
	       from.SendMessage( "An Ethereal Beetle has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 7: //Ethereal Ki-Rin
	    { 
	       Item item = new EtherealKirin();
	       from.SendMessage( "An Ethereal Ki-Rin has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 8: //Ethereal Swamp Dragon
	    { 
	       Item item = new EtherealSwampDragon();
	       from.SendMessage( "An Ethereal Swamp Dragon has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    }
	    case 9: //Ethereal Hiryu
	    { 
	       Item item = new EtherealHiryu();
	       from.SendMessage( "An Ethereal Hiryu has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
           } 
         }
      }
   }
}
 

Packer898

Knight
I made my own ethereal deed and gump here while back because I wanted an ethereal deed without the aos animals. Ill post a section from mine that is what your trying to do. Maybe this will help you see another one that works perfectly.

Code:
	public class EtherealGump : Gump
	{
		private Mobile m_From;
		private EtherealDeed m_Ticket;
		
		public EtherealGump( Mobile owner ) : base( 50, 50 )
		{
			
			AddBackground( 0, 0, 400, 385, 0xA28 );
			
			AddHtml( 30, 45, 340, 70, "Please select an ethereal mount from the list below.", true, true ); // Please select an ethereal mount from the list below.
			
			AddButton( 46, 128, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
			AddHtml( 80, 130, 320, 35, "Ethereal Horse", false, false ); // Ethereal Horse
			
			AddButton( 46, 163, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
			AddHtml( 80, 165, 320, 35, "Ethereal Llama", false, false ); // Ethereal Llama
			
			AddButton( 46, 198, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
			AddHtml( 80, 200, 320, 35, "Ethereal Ostard", false, false ); // Ethereal Ostard
			
			AddButton( 120, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 154, 342, 100, 35, 1011012, false, false ); // CANCEL
		}
		
		public override void OnResponse( NetState state, RelayInfo info )
		{
			Mobile from = state.Mobile;
			//EthyDeed ed = ed.Delete();
			
			switch ( info.ButtonID )
			{
				case 0:
					{
						from.AddToBackpack(new EtherealDeed());
						from.SendMessage( "You decide not to select an ethereal mount, the deed has been replaced." );
						from.PlaySound( 521 );
						break;
					}
				case 1:
					{
						from.AddToBackpack(new EtherealHorse());
						from.SendMessage( "A Ethereal Horse has been placed into your backpack." );
						from.PlaySound( 521 );
						break;
					}
				case 2:
					{
						from.AddToBackpack(new EtherealLlama());
						from.SendMessage( "A Ethereal Llama has been placed into your backpack." );
						from.PlaySound( 521 );
						break;
					}
				case 3:
					{
						from.AddToBackpack(new EtherealOstard());
						from.SendMessage( "A Ethereal Ostard has been placed into your backpack." );
						from.PlaySound( 521 );
						break;
					}
			}
			
		}
	}
 

Krystyl_Rose

Wanderer
boy do I feel dumb.... I JUST realized it is saying the error is in the deed now not the gump :( I worked the scripts seperately after having so much trouble with it so that I could figure out which I was erroring out the most and then I missed that entirely *shakes head in shame* I will see if I can fix it and post back shortly.

Thank You for the help everyone. Yes, Packer898 seeing a working script does help me find where I went wrong. I am very much a visual learner, thank you for your patience.
 
heh, I was already concerned, why it still gave the error after renaming the gump haha didn't recognize either, that the error is for another script, so don't feel bad about it ok ;)
 

Krystyl_Rose

Wanderer
ok now I am getting this error...

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors)
 - Error: Scripts\Customs\MountDeed\EtherealDeed.cs: CS0246: (line 31, column 24
) The type or namespace name 'EtherealGump' could not be found (are you missing
a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

and these are both scripts:
ETHEREAL DEED
Code:
using System;
using Server;
using Server.Gumps;
using Server.Network;

namespace Server.Items
{
	public class EtherealMountDeed : Item
	{
		
		[Constructable]
		public EtherealMountDeed() : base ( 0x14F0 )
		{
			Name = "Ethereal Mount Deed";
			Weight = 1.0;
			LootType = LootType.Blessed;
			Hue = 1150;
		}
		public EtherealMountDeed ( Serial serial ) : base ( serial )
		{
		}

      		public override void OnDoubleClick( Mobile from ) 
      		{
			if ( !IsChildOf( from.Backpack ) )
			{
				 from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else
			{ 
				from.SendGump( new EtherealGump( from, this ) );
			}
		}

		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();
		}
	}
}

ETHEREAL DEED GUMP
Code:
using System;
using System.Net;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Network; 

namespace Server.Gumps
{ 
	public class EtherealMountGump : Gump
	{ 
		private Mobile m_Mobile;
		private Item m_Deed;

		public EtherealMountGump( Mobile from, Item deed ) : base( 30, 20 ) 
		{


			AddPage ( 1 );
		
	 AddBackground( 0, 0, 300, 400, 5054 ); 
	 AddBackground( 8, 8, 284, 384, 3000 ); 

	 AddLabel( 40, 12, 0, "Ethereal List" ); 

	 AddLabel( 52, 40, 0, "Ethereal Horse" ); 
	 AddButton( 12, 40, 4005, 4007, 1, GumpButtonType.Reply, 1 ); 
	 AddLabel( 52, 60, 0, "Ethereal Llama" ); 
	 AddButton( 12, 60, 4005, 4007, 2, GumpButtonType.Reply, 2 ); 
	 AddLabel( 52, 80, 0, "Etheral Ostard" ); 
	 AddButton( 12, 80, 4005, 4007, 3, GumpButtonType.Reply, 3 ); 
	 AddLabel( 52, 340, 0, "Etheral Ridgeback" ); 
	 AddButton( 12, 100, 4005, 4007, 4, GumpButtonType.Reply, 4 ); 
	 AddLabel( 52, 120, 0, "Ethereal Unicorn" ); 
	 AddButton( 12, 120, 4005, 4007, 5, GumpButtonType.Reply, 5 ); 
	 AddLabel( 52, 140, 0, "Ethereal Beetle" ); 
	 AddButton( 12, 140, 4005, 4007, 6, GumpButtonType.Reply, 6 ); 
	 AddLabel( 52, 160, 0, "Ethereal Ki-Rin" ); 
	 AddButton( 12, 160, 4005, 4007, 7, GumpButtonType.Reply, 7 ); 
	 AddLabel( 52, 180, 0, "Ethereal Swamp Dragon" ); 
	 AddButton( 12, 180, 4005, 4007, 8, GumpButtonType.Reply, 8 ); 
	 AddLabel( 52, 200, 0, "Ethereal Hiryu" ); 
	 AddButton( 12, 200, 4005, 4007, 9, GumpButtonType.Reply, 9 ); 
	 AddLabel( 52, 220, 0, "Close" ); 
	 AddButton( 12, 220, 4005, 4007, 0, GumpButtonType.Reply, 0 ); 
      }

	public override void OnResponse( NetState state, RelayInfo info )
      { 
		Mobile from = state.Mobile;
         BaseCreature mount;
		switch ( info.ButtonID )
		{
			case 0: //Close Gump 
			{
			from.CloseGump( typeof( EtherealMountGump ) ); 
			break; 
	    } 
	    case 1: // Ethereal Horse
	    { 
	       Item item = new EtherealHorse();
	       from.SendMessage( "An Ethereal Horse has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 2: // Ethereal Llama 
	    { 
	       Item item = new EtherealLlama();
	       from.SendMessage( "An Ethereal Llama has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 3: // Ethereal Ostard
	    { 
	       Item item = new EtherealOstard();
           from.SendMessage( "An Ethereal Ostard has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 4: // Ethereal Ridgeback
	   	{ 
	       Item item = new EtherealRidgeback();
	       from.SendMessage( "An Ethereal Ridgeback has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 5: // Ethereal Unicorn
	    { 
	       Item item = new EtherealUnicorn();
	       from.SendMessage( "An Ethereal Unicorn has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 6: //Ethereal Beetle
	    { 
	       Item item = new EtherealBeetle();
	       from.SendMessage( "An Ethereal Beetle has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 7: //Ethereal Ki-Rin
	    { 
	       Item item = new EtherealKirin();
	       from.SendMessage( "An Ethereal Ki-Rin has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    } 
	    case 8: //Ethereal Swamp Dragon
	    { 
	       Item item = new EtherealSwampDragon();
	       from.SendMessage( "An Ethereal Swamp Dragon has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item ); 
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    }
	    case 9: //Ethereal Hiryu
	    { 
	       Item item = new EtherealHiryu();
	       from.SendMessage( "An Ethereal Hiryu has been placed into your backpack." );
	       item.LootType = LootType.Blessed;
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
           } 
         }
      }
   }
}
 

Packer898

Knight
Error: In etherealdeed you have th egump called EtherealGump
Code:
The type or namespace name '[COLOR="Red"]EtherealGump[/COLOR]' could not be found

Etherealgump name is....EtherealMountGump...
Code:
	public class [COLOR="red"]EtherealMountGump[/COLOR] : Gump

change EtherealDeed to this...
Code:
      		public override void OnDoubleClick( Mobile from ) 
      		{
			if ( !IsChildOf( from.Backpack ) )
			{
				 from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else
			{ 
				from.SendGump( new [COLOR="Red"]EtherealMountGump[/COLOR]( from, this ) );
			}
		}
 

Packer898

Knight
One last thought just looking over the gump. Ethereal are already blessed so no need to add it in yourself.
Code:
	    case 1: // Ethereal Horse
	    { 
	       Item item = new EtherealHorse();
	       from.SendMessage( "An Ethereal Horse has been placed into your backpack." );
	       item.LootType = LootType.Blessed[COLOR="Red"];//You can delete this line in each of the different ethies. THey are blessed already in Ethereals.cs[/COLOR]
	       from.AddToBackpack( item );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    }
 

Packer898

Knight
Ok one more thought lol. Since you dont have to bless them here you can delete a few lines of code from each case.
Code:
	    case 1: // Ethereal Horse
	    { 
	       from.SendMessage( "An Ethereal Horse has been placed into your backpack." );
	       from.AddToBackpack( new EtherealHorse() );
	       from.CloseGump( typeof( EtherealMountGump ) );
	       m_Deed.Delete(); 
	       break; 
	    }
 

Krystyl_Rose

Wanderer
Oh geez I feel like a total dope! I never even thought about the names being a little different... Thanks Packer for the help *wishes you positive karma even if I cant actually pass it on yet* :)
 
Top