JBob

Member
Did a test where i had one account buy use of the chest and then i deleted the account right away. When i did that and restarted the server i get this...

Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at CustomsFramework.Systems.VIPSystem.VIPModule.Check()
   at Server.World.Load() in c:\ServUO-master\Server\World.cs:line 882
   at Server.Core.Main(String[] args) in c:\ServUO-master\Server\Main.cs:line 588

I was going to find a way to make the chest reset itself after an account has been deleted.
I looked around on The Google and couldn't really find anything.

Anyone have any idea?
 
From Main.cs
Code:
if (Console.ReadKey(true).Key != ConsoleKey.R)//Line 588
{
	return;
}

from World.cs
Code:
foreach (SaveData saveData in _Data.Values)
{
	saveData.Prep();//Line 882
}
 
i guess the account i had deleted did had vip. and no I'm not using vip for the chest.
 
It's most likely that you're at some point attempting to affect the player object that you deleted. You'll need a null check somewhere.
 
Looks like you have a VIP Module loaded. Did you have the account set to a VIPTier?

There is a null check for the LinkedMobile, so not sure where the null came in, but I'm suspecting a null value for VIPTier for some reason. Can you recreate the error in debug mode?
 
I did have the account to the VIP Gold Tier.

I restarted the server in debug without any changes.
Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at CustomsFramework.Systems.VIPSystem.VIPModule.Check() in c:\ServUO-master\Scripts\Custom Systems\VIP System\Core\VIPModule.cs:line 189
   at CustomsFramework.Systems.VIPSystem.VIPModule.Prep() in c:\ServUO-master\Scripts\Custom Systems\VIP System\Core\VIPModule.cs:line 184
   at Server.World.Load() in c:\ServUO-master\Server\World.cs:line 882
   at Server.Core.Main(String[] args) in c:\ServUO-master\Server\Main.cs:line 588

To get this error...
I had an account that was VIP status.
Added an Account Chest and bought it with the player.
Once the player got it i saved and restarted
After the restart i deleted the VIP Status Account and saved/restarted again
When the server came back i got this error.
After some thought this may not have come from my chest at all. It may just be the deletion of the VIP Account.
I'll do a couple tests on a fresh server to see what happens.
 
I didn't put a null check in to see if the account has been deleted yet.
That's what I was in the process of testing when I got this.

I'm not sure what code to use for looking to see if the account has been deleted.
Maybe there's a way to have it check on start-up somehow? Not sure.
 
Status Update:
I Get this error if the VIP account was deleted with or without an account chest connected to it.

Updated Update 12:30pmEst. Seems odd to me that i get this when a player account is deleted to.
 
Last edited:
Yes, the VIP system was never finished, the error is not related to your chests at all. I do not recommend anyone use the VIP system. I can fix that problem thanks to yyour debugging, but I would still avoid using the VIP system or anything related to the Custom Framework until Insanity gets back and finishes it.
 
Thank you.
Im still having an issue with somthing.

I have a gump popup to select okay or cancel.
I get this error in my code.
Code:
 CS0118: Line 204: 'Server.Items.AccountDepositBox' is a 'type' but is used like a 'variable'
CS0118: Line 205: 'Server.Items.AccountDepositBox' is a 'type' but is used like a 'variable'
CS0118: Line 206: 'Server.Items.AccountDepositBox' is a 'type' but is used like a 'variable'

Code:
                case (int)Buttons.Okay:
				{
					Item[] Token = sender.Mobile.BankBox.FindItemsByType( typeof( Gold ) );
					if ( sender.Mobile.BankBox.ConsumeTotal( typeof( Gold ), 50000 ) )
					{
						AccountDepositBox(sender.Mobile).m_Account = sender.Mobile.Account.Username;//Line 204
						AccountDepositBox(sender.Mobile).Name = sender.Mobile.Name.ToString() + "'s Account Deposit Box";//Line 205
						AccountDepositBox(sender.Mobile).Hue = 0x482;//Line 206
						sender.Mobile.SendMessage("You successfully bought use of this Account Deposit Box!");
						sender.Mobile.SendMessage("This Account Deposit Box is now linked to all characters on this account.");
					}
					else
					{
						sender.Mobile.SendMessage( "You do not have enough gold in the bank to purchase the Account Deposit Box." );
						return;
					}
					break;
				}

How would i go about setting properties of an item the player is trying to buy from a gump buttons responce?
 
It looks like you're trying to use a class as a method.. It's kind to hard to tell what's going on from just those lines without knowing what it's in or what the AccountDepositBox class looks like. Basically, if you have the object declared, you need to set those properties from that object. If you don't have it declared, you'll need to do something like this.

Code:
AccountDepositBox box = new AccountDepositBox(sender.Mobile);
box.m_Account =
box.Hue =
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back