- ServUO Version
- Publish Unknown
- Ultima Expansion
- None
Ok I am making a new type of training for pets and im using my animal lore gump. not to get into all the details I have most of it worked out. The problems im having are that I am using a custom general type of mobile a BaseTameable mobile (Which I will include). In the OnResponse section i can get it to add strength points to the basecreature part but I am having issues with it trying to subtract points from the basetameable section. and I am also having issues with getting it to open a new gump getting the
Errors:
+ Skills/AnimalLore.cs:
CS0103: Line 738: The name 'from' does not exist in the current context.
I will post the code I think is relevant not entire code and i will attach files that this uses see if I can get some help. So close to getting this to work lol
The two areas I am having issues with are
m_BT.TrainingPoints -= 1;
m.SendGump( new AnimalLoreGump( from, m_Pet ) );
I think I have a clue but not really sure about how to fix it if there is a script I can look at to give me a push in correct direction that would even help
Ok I figured out the Subtracting from the BaseTameable now just need to figure out how to open the gump back up when clicking on button or on response lol
the
Errors:
+ Skills/AnimalLore.cs:
CS0103: Line 738: The name 'from' does not exist in the current context
which is this line of code
m.SendGump( new AnimalLoreGump( from, m_Pet ) );
Errors:
+ Skills/AnimalLore.cs:
CS0103: Line 738: The name 'from' does not exist in the current context.
I will post the code I think is relevant not entire code and i will attach files that this uses see if I can get some help. So close to getting this to work lol
The two areas I am having issues with are
m_BT.TrainingPoints -= 1;
m.SendGump( new AnimalLoreGump( from, m_Pet ) );
I think I have a clue but not really sure about how to fix it if there is a script I can look at to give me a push in correct direction that would even help
Animal Lore Gump sections:
public class AnimalLoreGump : Gump
{
private BaseCreature m_Pet;
private BaseTameable m_BT;
public AnimalLoreGump( Mobile from, BaseCreature c ) : base( 250, 50 )
{
m_Pet = c;
BaseTameable BT = c as BaseTameable;
public override void OnResponse( NetState sender, RelayInfo info )
{
Mobile m = sender.Mobile;
//BaseTameable BT = m as BaseTameable;
if ( m == null )
return;
switch ( info.ButtonID )
{
case 0:
{
break;
}
case 1:
{
m.SendMessage( 0x5, "You Raised the Strength of your pet." );
m_Pet.Str += 1;
m_BT.TrainingPoints -= 1;
m.SendGump( new AnimalLoreGump( from, m_Pet ) );
break;
}
case 2:
{
break;
}
case 3:
{
break;
}
}
}
the
Errors:
+ Skills/AnimalLore.cs:
CS0103: Line 738: The name 'from' does not exist in the current context
which is this line of code
m.SendGump( new AnimalLoreGump( from, m_Pet ) );
Attachments
Last edited: