Full Version : Skill Gump Time
xmlspawner >>Scripting Support >>Skill Gump Time
<< Prev | Next >>
Asmir02- 02-16-2006
Im Trying to send s skillgump when players make new accounts but i get some errors.
Errors

CODE
- Error: Scripts\Custom Made Scripts\SkillGumpTime.cs: CS1501: (line 26, column 17) No overload for method 'SkillGump' takes '1' arguments

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;
using Server.Misc;
namespace Server.Misc
{
public class SkillGumpTime
{
public static void Initialize()
{
EventSink.Login += new LoginEventHandler( EventSink_Login );
}
private static void EventSink_Login( LoginEventArgs args )
{
Mobile m = args.Mobile;
Account acc = m.Account as Account;
if ( acc.TotalGameTime > TimeSpan.FromHours( 40.0 ) )
{
m.SendGump( new SkillGump( m ) );
}
}
}
}

To Ty for all the help
Post Edit Still One Error Left
Galfaroth- 02-17-2006
m.SendGump( new SkillGump( m ) ); without , null.
Asmir02- 02-17-2006
One Error Left I Edit The Post So Not to Waste So Much Space
Dian- 02-17-2006
Is this SkillGump a gump you have created? if so, you would need to post that. Your missing somthing in the SendGump..

CODE
m.SendGump( new SkillGump( m, MissingSomthingHere ) );

Or, you simply dont need that ( m ) at all.. cant say for sure without seeing the SkillGump of yours.. like..

CODE
m.SendGump( new SkillGump() );

Asmir02- 02-18-2006
Ok Still One Error Left Sorry for the trouble
Error

CODE
- Error: Scripts\Custom Made Scripts\SkillGumpTime.cs: CS1501: (line 26, column 17) No overload for method 'SkillGump' takes '0' arguments

Script

CODE
using System; using System.Net; using Server; using Server.Accounting; using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Misc;
namespace Server.Misc
{
public class SkillGumpTime
{
public static void Initialize()
{
EventSink.Login += new LoginEventHandler( EventSink_Login );
}
private static void EventSink_Login( LoginEventArgs args )
{
Mobile m = args.Mobile;
Account acc = m.Account as Account;
if ( acc.TotalGameTime > TimeSpan.FromHours( 40.0 ) )
{
m.SendGump( new SkillGump() );
}
}
}
}

Ty for all the help
Dian- 02-18-2006
Still need to know what this SkillGump is, the standard gump is SkillsGump, so you have to of made a new one called, SkillGump. Without seeing that code, I cant tell you how you need to call the gump from the script you provided.