Author Topic: Packages  (Read 738 times)

With the Team Deathmatch v4 "Packages" system, I have run into a problem when having multiple packages existing at once when activating and deactivating them.

Here is an example file with the basic code for the package system (no functional deathmatch). The comments at the top of the .tdm files are important, but if the format for them needs to be changed to work, that is fine.

The problem occurs when I activate packages then deactivate them and start a different package:
(Bold is comments)
Quote
ctf Activating CTF
-New Package: ctf
CTF - CHECK
CTF - SETTINGS
ctf Deactivating CTF
-Deactivate Package: ctf
TDM - SETTINGS
cr Activating CR
-New Package: cr
CTF - CHECK WHAT
CTF - SETTINGS

I have rewrote the code for this system several times and the same problem happens each time. If someone could write working code for activating and deactivating the packages, I would much appreciate this.

- The Check function must be called before activating a package. If its return value is not "1", an error message should be displayed with the value. This can be changed, but a "Check" which I can edit and add new packages to without editing the source file must exist.
- Settings must be called if the package is "allowed" to start.

I have an idea for this, I'm just busy now.  I'll try to get to a solution for ya as soon as possible.