1. What?... :D

    Code:
    [Oxide] 12:46 AM [Error] AntiWallhack: NullReferenceException while calling OnEntityEnter: Object reference not set to an instance of an object
      at Oxide.Plugins.AntiWallhack.OnEntityEnter (.TriggerBase triggerbase, .BaseEntity entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [Oxide] 12:46 AM [Error] AntiWallhack: NullReferenceException while calling OnEntityEnter: Object reference not set to an instance of an object
      at Oxide.Plugins.AntiWallhack.OnEntityEnter (.TriggerBase triggerbase, .BaseEntity entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [Oxide] 12:46 AM [Info] CRY5TAL C18; PrO_Kiler_2002 (bow | pelvis | 33<.)
     
  2. yeah this is pissing me off ...
    just forget about this error it doesnt bug the plugin ...
    i just have NO idea how to fix it, i thought i did but everytime i didnt XD
     

  3. So... You need this :D Tambourine!

    [​IMG]
     
    Last edited by a moderator: Feb 9, 2015
  4. :S have problem
    [​IMG]
     
  5.  
  6. not sure if i have to delete old cfg but this is bugging peoples doors you can make one door fine but as soon as you make more there auto deleted not errors at server console really weird unloaded your plugin and doors work normally




    ill fix that error for you above gimme a sec its very simple

    walla

    void OnEntityEnter(TriggerBase triggerbase, BaseEntity entity)
    {
    if (entity != null && triggerbase != null && triggerbase.gameObject != null && triggerbase.gameObject.name == "servercollision")
    {
    if (entity.GetComponentInParent<BasePlayer>())
    {
    var player = entity.GetComponentInParent<BasePlayer>();
    if (player != null && player.net != null)
    {
    if (player.net.connection.authLevel < 1)
    {
    if (posSave.ContainsKey(entity) == false) { posSave.Add(entity, new Dictionary<TriggerBase, Vector3>()); }
    posSave[entity][triggerbase] = entity.transform.position;
    }
    }
    }
    }
    }



    basically when called if a player disconnects your not checking if there data is not null pretty much do this with every possible thing you can
     
  7. i'm pretty sure you will still have the problem with this code.
     
  8. nah dude it clearly says its a null reference so you check there not reference set to a instance of a object aka its null so check all things are not nulls

    if you do check entity.transform isnt null but it should be good now


    just use it trust me

    ill download a test server on my pc and fix that door bug that i was talking about earlier and ill fixup your code abit if it needs it i havent really looked at it much yet but i have over 10 years + experience in c#

    btw you have such a horrible memory leak im patching it up damn...
    [DOUBLEPOST=1423530568][/DOUBLEPOST]memory leaks and bugged doors fixed hope you learn from this:


    And fixed a few more bugs when door failed to add you got errors and a few other thing here:

    also i think they limited the amount of door i can only add a certain amount in my building with this plugin before i modified it aswell


    nevermind that its down to adding the triggerbase you cant seem to add doors after tiggerbase is added so ive added a bigger timer before triggerbase

    alls fixed as far as i can see its running sweet here you go(also commented where i edited):
    http://pastebin.com/vpqgB67P
     
    Last edited by a moderator: Feb 10, 2015
  9. CHR

    CHR

    Reneb say something about the codeing posted above...

    What should we take or do. Ty
     
  10. thanks i guess i could actually remove the doorways then.
    and keep the doors.
    i'll use your code for the memory leak fix
     
  11. Reneb updated Anti Wallhack with a new update entry:

    major fix, thx ownprox


    [DOUBLEPOST=1423579126][/DOUBLEPOST]i removed some of your null detections as it's impossible for them to be null when called.
    but left most of them :)
    also diminished the timers and removed the doorways to be sure that it fixes the door bug.
     
  12. Code:
    [Oxide] 5:50 PM [Info] AntiWallhack plugin was compiled successfully in 214ms
    [Oxide] 5:50 PM [Info] Loaded plugin Anti Wallhack v1.6.0 by Reneb & ownprox
    [Oxide] 5:50 PM [Info] AntiWallhack: Creating a new config file
    [Oxide] 5:50 PM [Error] AntiWallhack: NullReferenceException while calling OnEntityEnter: Object reference not set to an instance of an object
      at Oxide.Plugins.AntiWallhack.OnEntityEnter (.TriggerBase triggerbase, .BaseEntity entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
     
  13. do you have the latest version?
     
  14. Nothing... Same again, can't place doors
     
  15. Last of latest
     
  16. i upload last verion but the problem with doors isnt fix
    they still disapear
     
  17. Code:
    [Oxide] 5:46 PM [Info] AntiWallhack plugin was compiled successfully in 230ms
    [Oxide] 5:46 PM [Info] Loaded plugin Anti Wallhack v1.6.0 by Reneb & ownprox
    [Oxide] 5:46 PM [Info] AntiWallhack: Creating a new config file
    [Oxide] 5:46 PM [Error] AntiWallhack: NullReferenceException while calling OnEntityEnter: Object reference not set to an instance of an object
      at Oxide.Plugins.AntiWallhack.OnEntityEnter (.TriggerBase triggerbase, .BaseEntity entity) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
     
  18. you will need to restart your server
    [DOUBLEPOST=1423580122][/DOUBLEPOST]well then it's not my plugin cause i asked all my players on the server NO one reported bug doors that disappear ...
     
  19. Ok, going restart
     
  20. :) after each restart, I find the doors half open(i.e. not completely closed or open. Also you can not enter but you can see inside. It's half open) 2015-02-10_00001.jpg
     
    Last edited by a moderator: Feb 10, 2015