View previous topic :: View next topic |
Author |
Message |
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Sun Oct 19, 2008 8:57 Post subject: Vanishing Objects... |
|
|
I'm not sure where this is occurring NWNX or NWN1 (assuming the former - even against the evidence)
I'm using RCO to fetch objects from the database, and load them into a store object.
During the 'OnSpawn' of an NPC, I create a store and load it.
The objects are created in/for the store and an inventory scan can find them all. However when I go to Open the store - all but one (not the 1st, or last) is missing from the store. (I can even get multiple copies of remaining item, but I can't seem to find 'when' the others are disappearing.)
Just wondering if anyone has come across this type of behavior.
o OBJECT: 1346 bytes
‡ -> worth100 [worth100]
o OBJECT: 1340 bytes
‡ -> worth7 [worth7]
key
o = NWNX Log entry
‡ -> = GetName(obj) + GetTag(obj) from in game
Cheers
Gryphyn |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Mon Oct 20, 2008 3:37 Post subject: |
|
|
Got it...a side-effect.
I was reassigning the #charges to the items I was fetching.
There is no sanity check on SetItemCharges(0) to only effect items that have a 'charges' property. So setting charges=0 on any item, effectively destroys the item (which occurs after the script completes)
Now that I'm only reapplying charges > 0, all my items are back.
Only one thing left to say
Doh!
Cheers
Gryphyn |
|
Back to top |
|
|
|