Player Gov System / Barracks System

ion

Active Member
Mar 20, 2013
41
1
35
Shard Name
Bane
This is a 2 part question. I have both of these system installed and the server boots up and runs fine. When I put a city hall down it auto makes me the mayor like it should. After a few minutes if I run off for a while or log off and log back in it says I am no longer the mayor when I try to add other buildings. I can click on props and click the city management stone but it stills says I am the mayor. Not sure why the system is not registering me as the mayor one I go out adventuring.

Part 2: I added in the Barracks system to make the cities attackable. I have the army controller in my inventory. I click the stone in front of the barracks to recruit a soldier. This crashes the server and gives this error.
C#:
ServUO Version 0.5, Build 7217.34674
Operating System: Microsoft Windows NT 6.2.9200.0
.NET Framework: 4.0.30319.42000
Time: 10/29/2019 3:37:59 AM
Mobiles: 43063
Items: 220084
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.ArmyController.GoThere(Point3D point)
   at Server.Items.ArmyController.SetFormation(ArmyFormationEnum formation)
   at Server.Items.ArmyController.Recruit(Mobile from, BaseCreature soldier)
   at Server.Gumps.RecruitTypeGump.OnResponse(NetState state, RelayInfo info)
   at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

Clients:
- Count: 1
 

sahisahi

Well-Known Member
Jan 13, 2016
761
32
Run the server in debug mode, then make it crash and post the error is the best way to find the issue/line number

Regarding the major issue, it seems like you are missing serialize/deserialize in your playermobile. So you should post your playermobile.cs
 

ion

Active Member
Mar 20, 2013
41
1
35
Shard Name
Bane
I got the mayor issue fixed. I was definitely missing the serialize code in playermobile. Thanks! The army controller / barracks issue is still there with the same error. I tried to run in Debug mod but this is all I get

The thread 0x7ec has exited with code 259 (0x103).
The thread 0x1ad4 has exited with code 259 (0x103).
The thread 0xf30 has exited with code 259 (0x103).
The program '[740] ServUO.exe' has exited with code -1 (0xffffffff).
 

sahisahi

Well-Known Member
Jan 13, 2016
761
32
Can you post the install instrucitons so i can install the system and test the crash