The Solution.
It was the Plugin --> Tugme.cs
IimmediatelylookedatsomeotherpluginsthatcontainAutorurretrules.
I got this information from acquaintances.
But I will not put the other solutions here because I only use Tugme and sometimes Convoy.
It is not really up to me to solve it.
In any case, I give Tugme solution.
But now about the other plugins that I looked at.
Which also have the same problems.
1 TurretLoadouts
2 ArmoredTrain
3 Convoy
4 Tugme
AutoTurret Red Flag
____________________
(ERROR AND FIX)
__________________________________________________________________________________________________________
(ERROR)
NullReferenceException: Object reference not set to an instance of an object
NullReferenceException: Object reference not set to an instance of an object
at AutoTurret.AimOffset (BaseCombatEntity aimat) [0x00084] in <f28a600251754fd59d72e11dafa25ae2>:0
at AutoTurret.UpdateFacingToTarget (System.Single dt) [0x00027] in <f28a600251754fd59d72e11dafa25ae2>:0
at AutoTurret.ServerTick () [0x00063] in <f28a600251754fd59d72e11dafa25ae2>:0
at InvokeHandlerBase`1[T].DoTick () [0x00138] in <09eb49be2d8142c8bbe9f17430fe62d8>:0
at InvokeHandlerBase`1[T].LateUpdate () [0x0000c] in <09eb49be2d8142c8bbe9f17430fe62d8>:0
___________________________________________________________________________________________________________
(FIX)
Copy and paste From line 2711 till 2730 will fix the isseu
==========================================================
2709
2710
AutoTurret autoturret = GameManager.server.CreateEntity(Autoturretprefab, tugboat.transform.position + tugboat.transform.rotation * position.Position, tugboat.transform.rotation * Quaternion.Euler(position.Rotation)) as AutoTurret;
AttachToTug(autoturret, tugboat);
NextFrame(() =>
{
if (autoturret && autoturret.AttachedWeapon )
{
Item item = ItemManager.CreateByName(config.AutoTurretGun, 1, 0);
if (!item.MoveToContainer(autoturret.inventory, 0, false)) { item.Remove(); }
else { autoturret.UpdateAttachedWeapon(); }
}
autoturret.InitializeHealth(config.AutoTurretHealth, config.AutoTurretHealth);
FillAmmoTurret(autoturret);
foreach (var npc in NPCs.Keys)
{
PlayerNameID playerNameID = new PlayerNameID();
playerNameID.userid = npc.userID;
playerNameID.username = npc.displayName;
autoturret.authorizedPlayers.Add(playerNameID);
}
if (!autoturret.IsPowered()) { autoturret.InitiateStartup(); autoturret.authDirty = true; }
2031
2032______________________________________________________________________________________________________________