FaceMelter
Member
I would like to make a custom GUMP for the "checkmobfactions" command on my shard. I have added
quite a few more factions to the list and it's all working properly, but I'd like to make a fancier GUMP to look at it with. I tried to use GUMP Studio, but it's giving me a register error.
So, I'd like to start one from scratch but I don't know how to call the XMLMobFactions attribute data.
Here is my GUMP, it wont compile, and I'm not sure why.
And here is the error:
quite a few more factions to the list and it's all working properly, but I'd like to make a fancier GUMP to look at it with. I tried to use GUMP Studio, but it's giving me a register error.
So, I'd like to start one from scratch but I don't know how to call the XMLMobFactions attribute data.
Here is my GUMP, it wont compile, and I'm not sure why.
Code:
//////////////////////////////////////////////////////////////////////
// Automatically generated by Bradley's GumpStudio and roadmaster's
// exporter.dll, Special thanks goes to Daegon whose work the exporter
// was based off of, and Shadow wolf for his Template Idea.
//////////////////////////////////////////////////////////////////////
//#define RunUo2_0
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Commands;
namespace Server.Gumps
{
public class XMLvirtuegump : Gump
{
Mobile caller;
public static void Initialize()
{
#if(RunUo2_0)
CommandSystem.Register("XMLvirtuegump", AccessLevel.Administrator, new CommandEventHandler(XMLvirtuegump_OnCommand));
#else
Register("XMLvirtuegump", AccessLevel.Administrator, new CommandEventHandler(XMLvirtuegump_OnCommand));
#endif
}
[Usage("XMLvirtuegump")]
[Description("Makes a call to your custom gump.")]
public static void XMLvirtuegump_OnCommand(CommandEventArgs e)
{
caller = e.Mobile;
if (caller.HasGump(typeof(XMLvirtuegump)))
caller.CloseGump(typeof(XMLvirtuegump));
caller.SendGump(new XMLvirtuegump(caller));
}
public XMLvirtuegump(Mobile from) : this()
{
caller = from;
}
public XMLvirtuegump() : base( 0, 0 )
{
this.Closable=true;
this.Disposable=true;
this.Dragable=true;
this.Resizable=false;
AddPage(0);
AddBackground(45, 37, 420, 367, 9200);
AddImage(242, 51, 113);
AddImage(223, 1, 9000);
AddLabel(69, 130, 0, @"Honesty"); //AddHTML(100,130, 0, 0, 1234, false, false);
AddLabel(69, 160, 0, @"Compassion");
AddLabel(69, 190, 0, @"Valor");
AddLabel(69, 220, 0, @"Justice");
AddLabel(69, 250, 0, @"Sacrifice");
AddLabel(69, 280, 0, @"Honor");
AddLabel(69, 310, 0, @"Spirituality");
AddLabel(69, 340, 0, @"Humility");
AddLabel(250, 130, 0, @"Deceit");
AddLabel(250, 160, 0, @"Despise");
AddLabel(250, 190, 0, @"Destard");
AddLabel(250, 220, 0, @"Wrong");
AddLabel(250, 250, 0, @"Covetous");
AddLabel(250, 280, 0, @"Shame");
AddLabel(250, 310, 0, @"Hyloth");
AddLabel(250, 340, 0, @"Pride");
AddImage(432, -1, 10441, 141);
AddImage(-5, -1, 10440, 4);
}
public override void OnResponse(NetState sender, RelayInfo info)
{
Mobile from = sender.Mobile;
switch(info.ButtonID)
{
case 0:
{
break;
}
}
}
}
}
And here is the error:
Code:
----------------------------------------------------------------------------
JustUO - [http://www.playuo.org] Version 2.0
Publish 4
Core: .NET Framework Version 4.0.30319
Core: Optimizing for 8 64-bit processors
Core: Server garbage collection mode enabled
RandomImpl: CSPRandom (Software)
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Custom Systems/XMLvirtuegump.cs:
CS0103: Line 26: The name 'Register' does not exist in the current context
CS0120: Line 34: An object reference is required for the non-static field, m
ethod, or property 'Server.Gumps.XMLvirtuegump.caller'
CS0120: Line 36: An object reference is required for the non-static field, m
ethod, or property 'Server.Gumps.XMLvirtuegump.caller'
CS0120: Line 37: An object reference is required for the non-static field, m
ethod, or property 'Server.Gumps.XMLvirtuegump.caller'
CS0120: Line 38: An object reference is required for the non-static field, m
ethod, or property 'Server.Gumps.XMLvirtuegump.caller'
CS0120: Line 38: An object reference is required for the non-static field, m
ethod, or property 'Server.Gumps.XMLvirtuegump.caller'
CS0103: Line 57: The name 'AddHTML' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.