Zell Posted May 10, 2018 Group: Members Topic Count: 53 Topics Per Day: 0.01 Content Count: 412 Reputation: 266 Joined: 04/25/12 Last Seen: Monday at 01:30 PM Share Posted May 10, 2018 (edited) 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 May 10, 2018 by Zell Quote Link to comment Share on other sites More sharing options...
0 Zell Posted May 10, 2018 Group: Members Topic Count: 53 Topics Per Day: 0.01 Content Count: 412 Reputation: 266 Joined: 04/25/12 Last Seen: Monday at 01:30 PM Author Share Posted May 10, 2018 Never mind. Fixed, I'm stupid Quote Link to comment Share on other sites More sharing options...
Question
Zell
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
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 ZellLink to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.