Bug when left-click an NPC

Discussion in 'Plugin Development' started by Arignir, Sep 9, 2012.

Thread Status:
Not open for further replies.
  1. Hello !

    I'm Arignir, and i'm making an Npc plugin for my server. I can spawn my Npc and all work, but when i try to attack him (left click) i'm kicked from the server. I think it's becouse the server is trying to send a Packet to the Npc, and, of course, it's doesn't work !

    I don't know how to fix this bug, so if someone could help me, there is here a part of my code, and the logs ^^

    Logs :

    When i'm kick, it's written : "Disconnected by server, Internal server error"

    My Function SpawnNpc (I think it's the only important one :))

    Thanks to help me ! Arignir

    And sorry if my English is bad, I'm french =)
     
  2. Offline

    Taco

    It seems that something is null when you attack the npc, since it's throwing an error related the the damage event. Perhaps that provides a bit of insight? I really can't offer much more help, since I've never worked with NPCs before.
     
  3. Offline

    Infamous Jeezy

    Are you using any other events?
    Like an event that gets triggered when an entity is damaged?
    Like the above poster said this is being triggered because it is trying to use or modify a null value where it cannot.
     
  4. Offline

    gregthegeek

    May I suggest using an NPC library like tomcat's? It does a lot of the work for you.
     
  5. for the event that gets trigger, i dunnow but maybe it's something that normely belong to a real player as the ip adresse or something like that ^^ For the library, i only whant to use it if i couldn't found solutions ^^
     
Thread Status:
Not open for further replies.

Share This Page