Jump to content
  • 0

npcname_db null


Zell

Question


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

Hi!

I updated my emulator and now my custom command that I created its not working anymore.

The command duplicate a npc. Every thing is working fine, but when I use:

strdb_put(npcname_db, nd_duplicata->exname, nd_duplicata);

to save the NPC in db, "npcname_db" returns null.

If I remove this line, every thing works fine and my duplicate spawn and execute my script. But I will not be able to remove it later.

I transfered this line to npc.hpp to use in script.c

static DBMap* ev_db; // const char* event_name -> struct event_data*
static DBMap* npcname_db; // const char* npc_name -> struct npc_data*
	struct event_data {
    struct npc_data *nd;
    int pos;
};
	

I know that my npcname_db is not null cause I can use commands like @unloadnpc to remove a static npc.

So, any leads?

Edited by Zell
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

Never mind. Fixed, I'm stupid

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...