Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-19-2005, 03:30 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #2  
Old 10-19-2005, 06:30 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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
Reply With Quote
  #3  
Old 10-20-2005, 01:03 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
I used the exact same code in both cases, the only thing I changed was the WeaponName.PUBLICFUNCTION(); and the findNPC("NPCNAME").PUBLICFUNCTION();
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #4  
Old 10-20-2005, 02:25 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to 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();

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?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #5  
Old 10-20-2005, 02:25 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.