Postby LEA EAX,1 » Wed Oct 01, 2014 8:18 am
Yup, warnings will be reset not only in SnD, but in any round-based gametype. The reason for this is that technically, from the server's point of view, each round = fast_restart. This causes the Mono engine to reload all the scripts, and since SAT only saves its warnings in local, script variables, that data is lost upon restarting.
Solution: do what SinAdmin does, store the warns in .txt files.
In the long run, it may be a good idea to introduce a real database system. While Mono won't let you load any external DLLs (you'll get some nonsential "null argument" exceptions), DLLImport still works flawlessly. So, write a C++ helper DLL to interface SQLite access (SQLite's main advantage is that it doesn't need to be installed, it's just a local file), then import C++'s functions from within SAT (managed code can call unmanaged code, not the other way round). That would help eliminate some bugs caused by szczurcio's shitty hand-made .dat databases and improve speed, though I doubt it would eliminate the need for threads. It would, however, let you get rid of Mutexes (they only exist to avoid sharing violations and data races). Since the SQL engine manages all that by itself, undoubtedly better than szczurcio's buggy Mutexes, you wouldn't need them anymore.