The following is a programming tip that allows you to remove all dim’ed arrays added in an online game. The advantage of not letting too many extra variables build up is reduced garbage collects and reducing the chances of an out of memory error when having many games on your system. You see, every time a new variable is used in Commodore BASIC, that variable will stay in memory until you reboot the BBS. Too many new variables will use up what little memory is left, causing the computer to give an error.
Anyway, add this routine to the beginning of your module and when the module is exited, any dim’d variables created will automatically be removed from memory
52000 c=peek(49)+256*peek(50)-peek(47)-
256*peek(48):gosub52020
52010 c=c+peek(47)+256*peek(48):poke50,
int(c/256):poke49,c-256*peek(50):return
52020 beginning of your program
(change the line numbers as needed)
One important note… you cannot use the variable c in your module.
Anyway, using this routine along with any modules that dim large arrays will greatly increase the performance of your system (and all others using your modules).
Greg Pfountz