1. So I get this error upon attempting to set a door name(will list the functions in order below)
    1. Player opens the setup menu
    2. Player selects a door
    3. Player types the name of the door in chat(no command)
    4. RCON gets sent a error/
    Code:
    [Oxide] 02:53 [Info] [Better Chat] [Player] DylanSMR: test
    [Oxide] 02:53 [Error] Failed to call hook 'OnPlayerChat' on plugin 'RemoteEntities v1.0.0' (JsonSerializationException: Self referencing loop detected for property 'normalized' with type 'UnityEngine.Vector3'. Path 'playerH.76561198167856311.doorI.test.TotalEnt.pickup.itemTarget.iconSprite.bounds.center'.)
    [Oxide] 02:53 [Debug]   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContainerContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.Serialization.JsonContract& memberContract, System.Object& memberValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00000] in <filename unknown>:0
    [Oxide] 02:53 [Warning] Calling 'OnPlayerChat' on 'RemoteEntities v1.0.0' took 1274ms [GARBAGE COLLECT]
    [DOUBLEPOST=1470211048][/DOUBLEPOST]The code is still a bit messy(haven't had the time to clean it up sorry for that :p)
     

    Attached Files:

  2. The error means that you're trying to convert an object to JSON that in some place ends up referring to itself.
    Take the following recursive type as an example:
    Code:
    class Foo {
        Foo f;
    }
    Now, let's assume we're instantiating that type like the following:
    Code:
    var f = new Foo();
    f.f = f;
    f contains itself. The recursive type Foo now isn't just recursive, but it also refers to its own instance (A type may be recursive without referring to itself as well, take the linked list datastructure for example).
    If the JSON serializer is now trying to recursively convert that type (convert the type by converting each of its members) to JSON, it'll run into an issue:
    Code:
    // var f
    {
        // f.f
        {
            // f.f.f
            {
                // f.f.f.f
                {
                    // and so on ...
                }
            }
        }
    }
    That's what the error is about.

    A more simple case would be:
    Code:
    class Foo {
        Foo f = this;
    }
    Now, in this case, the error is more hidden than that. A type can refer to itself over many levels as well:
    Code:
    class A {
        B b;
    }class B {
        C c;
    }class C {
        D d;
    }class D {
        A a;
    }var a = new A();
    a.b = new B();
    a.b.c = new C();
    a.b.c.d = new D();
    a.b.c.d.a = a;
    Now to your actual code.
    None of your types are recursive.
    DoorInfo contains a member called TotalEnt, though, which has the type BaseEntity.
    BaseEntity contains such a self referential recursion somewhere, making it impossible to serialize the entire type and everything that uses BaseEntity.
    You probably didn't want to serialize BaseEntity in the first place, but an entity ID.
     
  3. Does each entity have a different ID? Im not sure how that worked itself.
     
  4. You can essentially generate an ID through the position of the entity. I know the old BuildingOwners implementation did that, maybe have a look at an older version before owner info was added.