Hello, I was wondering if anyone might be able to point me in the right direction with a misbehaving persistent item storage system.
To start with, here are both the OnOpen and OnClosed scripts in the same pastebin file: http://pastebin.com/eYh4qwv5
For starters, these are the same scripts this server has used for 10+ years. There have been three major iterations of the server; there was absolutely no misbehavior on the first (2002-2007) nor the second (2007-2012). Only after the final rework from 2012 onwards has it started misbehaving - the problem wasn't apparent immediately so I'm not sure if it was something related to the new version, but I guess it'd have to be.
The actual misbehavior comes in the form of stored items randomly being deleted or duplicated after a server reset and repopulation of the chests. I've even downloaded the database file, observed a chest with 2 listed items, opened the chest, saw 3 items (one was duplicated), closed the box, redownloaded it again, with the new number of 3 items in the DBF file. Somewhere the campaign object retrieval is going haywire, or the databases aren't being read right, or something.
Also, if it is of any interest, despite all persistent chests having been emptied while I consider the problem and possibly replace the system, the FPT file is still over 10 megabytes and has random item data for some reason. The DBF file has zero entries across the board. I would assume the FPT would empty out as items are retrieved.
I think I remember some reports of items randomly appearing where they shouldn't have as well, but I don't remember the circumstances clearly.
Either way, where could this problem be? We use NWNx2 but we're on good ol' base Bioware database stuff - no MySQL or SQL lite to speak of.
I guess my question is twofold: how can I fix this, and if it can't be figured out, does anyone know of any alternatives, just some nice, simple OnOpen/Onclose storage doodads?
Any help would be greatly appreciated. Thank you in advance for your time!!