![]() |
New Engine bug?
I was writing a script the other day, and couldn't figure out why it wasn't working. I was attempting to call a public function stored in a WNPC but the problem was, I had a DBNPC with the same name, so it was attempting to call the functions from the DB NPC. I then copied the code from the DB NPC, created a new one with a different name and deleted the old one. The script still failed to function. After an hour of frusturation, I tried creating a new WNPC with the exact same code in it, with a different name and the script worked flawlessly. I think there is a bug in the new engine that is preventing the deleted DB NPCs from being taken out of memory upon deletion.
|
There was a problem with the npc or with the weapon (could follow completely) ? If there is such a case you can probably also use findnpc/findweaponnpc
|
I used the exact same code in both cases, the only thing I changed was the WeaponName.PUBLICFUNCTION(); and the findNPC("NPCNAME").PUBLICFUNCTION();
|
I think Stefan is just saying that if there is a db NPC and a weapon with the same name, you have to distinguish between them using either:
findnpc("name").function(); findweaponnpc("name").function(); As for why the NPC Server tried to still call the functions of a non-existant NPC, I am not sure why. It could have something to do with the NPC not being deleted from the npcs/ folder. Maybe trying '/savenpcs' could fix that? |
Quote:
Quote:
|
| All times are GMT +2. The time now is 05:56 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.