ServUO Version
Publish Unknown
Ultima Expansion
The Second Age
Hello! I've been working on putting together a t2a package using ServUo Publish 54. It has gone pretty straight forward up until I tried to switch from unicode to ascii for the single-click names and localized messages/clilocs. It works for almost everything except a few stubborn items/scritps here and there. I'm pretty lost as to why some things work and others don't. certain single clicked items cause a crash

the common denominator for crashes seems to be the LabelNumber. But, its only a problem for some items. (ore, scales, potions, beveragebottle) many other LabelNumbers work just fine.
public override int LabelNumber
{
get
{
return 1041314 + (int)this.m_PotionEffect;
}
}
I'm able to prevent the crash by removing LabelNumber and building the string myself. I suppose I could go through the problem scripts and build the strings by hand, but I want to make this as user-friendly as possible, and I feel like the fix is right under my nose!
public override void AppendClickName(System.Text.StringBuilder sb, bool plural)
{

sb.Append(this.m_PotionEffect.ToString().ToLower()); //yes, im aware this isnt correct. just an example.
sb.Append(" potion");
}
Im pretty new to coding and don't understand a lot of the basics. Is there anybody who can help me figure out why its returning a nullrefrence on some LabelNumbers, but not others?
////////////////////////////////
Github Pub54T2A<-----------------------------------------current code base is here. you will need to delete the saves to create a new admin account if you download it. The GM account is admin:admin.
///////////////////////////////
Core edits have been made to packets.cs, item.cs and main.cs
This is from single clicking on a BeverageBottle
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Network.NetState.Send(Packet p) in c:\Users\alexr\Documents\GitHub\T2A-Pub54\Server\Network\NetState.cs:line 558
at Server.Item.OnSingleClick(Mobile from) in c:\Users\alexr\Documents\GitHub\T2A-Pub54\Server\Item.cs:line 5759
at Server.Items.BaseBeverage.OnSingleClick(Mobile from)
at Server.Network.PacketHandlers.LookReq(NetState state, PacketReader pvSrc) in c:\Users\alexr\Documents\GitHub\T2A-Pub54\Server\Network\PacketHandlers.cs:line 1693
at Server.Network.MessagePump.HandleReceive(NetState ns) in c:\Users\alexr\Documents\GitHub\T2A-Pub54\Server\Network\MessagePump.cs:line 187
at Server.Network.MessagePump.Slice() in c:\Users\alexr\Documents\GitHub\T2A-Pub54\Server\Network\MessagePump.cs:line 121
at Server.Core.Main(String[] args) in c:\Users\alexr\Documents\GitHub\T2A-Pub54\Server\Main.cs:line 589
 
Last edited:
Back