Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   New Engine bug? (https://forums.graalonline.com/forums/showthread.php?t=61819)

ApothiX 10-19-2005 03:30 PM

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.

Admins 10-19-2005 06:30 PM

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

ApothiX 10-20-2005 01:03 AM

I used the exact same code in both cases, the only thing I changed was the WeaponName.PUBLICFUNCTION(); and the findNPC("NPCNAME").PUBLICFUNCTION();

napo_p2p 10-20-2005 02:25 AM

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?

ApothiX 10-20-2005 02:25 PM

Quote:

Originally Posted by napo_p2p
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();

Oh, I understand now. But the problem still persists that its' trying to call functions from a deleted NPC.

Quote:

Originally Posted by napo_p2p
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?

I checked the npcs/ folder, and the NPC wasn't present there. I haven't tried /savenpcs though.


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.