(This is the "Dungeon Designs" column from the December 1992 issue of the Eamon Adventurer's Guild newsletter. Copyright 1992 Eamon Adventurer's Guild, 7625 Hawkhaven Dr., Clemmons, NC 27012-9408. You may reproduce this freely as long as this credit remains attached to the article.) Bug Fixes You Can Do. by Tom Zuchowski I get a fair number of calls and letters from people who are having problems with an Eamon adventure. Often, the fix is something very simple that anyone can do, if they know what to look for. Problem: The adventure is doing something that doesn't make sense, or is crashing. Fix: Check the revision date in the adventure's catalog. Compare the date on your disk with the revision date listed in the EAG newsletter (a DOS 3.3 list was printed last issue, and a ProDOS list was in the June '92 issue). If the date does not agree, check the EAG back issues that came out around the time of the revision date and look for a bug fix that has the same problem you are seeing. If you don't see anything that will help, proceed with the various procedures outlined in the rest of this article. Problem: WRITE PROTECTED error The Eamon system writes to files on both the Master and the adventure disks. You must not cover the write-enable notch with a write- protect tab. If the adventure is written to the back side of a disk, it may be that the write protect notch was improperly punched. Fix: If the write-protect notch is covered, remove the Write-protect tape from the side of the disk. If the adventure is on the back side of a disk, repunch the notch or else copy the adventure to the front side of another disk. Problem: DISK FULL error This error usually occurs when trying to SAVE a DOS 3.3 version of the game. Many of the better Eamon adventures do not have DOS 3.3 on the disk, because they require every possible bit of disk space. You will get this error on these big Eamons if you make a copy of the disk by using the DOS INIT command and copy the adventure over to the new disk file-by-file. INIT automatically installs a copy of DOS 3.3 on the disk. Fix: Make Eamon adventure copies with Copy II+, using the "disk" option, or else use COPYA from the DOS 3.3 Master. NOTE: Whenever you get a DISK FULL error while saving a game, you should immediately delete the files GAME.STR, GAME.SVAR, and GAME.PTRS (DOS 3.3) or SAVED.GAME (ProDOS). There is a danger that the disk catalog will be corrupted if you don't do so. Problem: I/O ERROR This error can not be caused by a bug in the adventure. Your disk is bad. Problem: PROGRAM TOO LARGE This error can not be caused by a bug in the adventure. It can only occur if the adventure's MAIN PGM has become corrupted. Note that your disk might be good, but was copied from a bad disk that contained the original error. You might also get this error in very large Eamons if you have any extra stuff resident in memory such as Program Writer. Problem: SYNTAX ERROR IN XXXX NEXT WITHOUT FOR ERROR IN XXXX RETURN WITHOUT GOSUB ERROR IN XXXX ILLEGAL QUANTITY ERROR IN XXXX UNDEF'D STATEMENT ERROR IN XXXX BAD SUBSCRIPT ERROR IN XXXX DIVISION BY ZERO ERROR IN XXXX TYPE MISMATCH ERROR IN XXXX These are genuine program bugs. Please follow these steps immediately after the crash, before typing anything else and before contacting the EAG with a bug report: 1) Write down the line number (XXXX) 2) Type LIST XXXX (XXXX = the line number) 3) The offending program line will be printed to the screen. It will contain a number of variable names, such as RO, M, AD%(A,4), etc. 4) Type PRINT statements for each of the variables in the bad line. PRINT RO PRINT M PRINT AD%(A,4) (Note that this includes the variable A which must also be printed) PRINT A etc. 5) Each time you type in a PRINT statement, the value of that program variable will be printed to the screen. Write down all this info. It is virtually impossible to fix obscure bugs without full knowledge of what the bad program line was doing. 6) It will be very helpful if you write down a detailed description of where you were in the dungeon and what you were doing at the time the error occurred. Please include the revision date of the disk and where you got it. It is possible that your supplier's disk became bad somehow and must be replaced; I will send them a replacement if I make this determination. Problem: When trying to "go on an adventure", the Main Hall program goes crazy, printing out all kinds of stuff without waiting for you to type anything. Fix: The FRESH MEAT file on the adventure disk is locked. Unlock the file with the command (DOS 3.3): UNLOCK FRESH MEAT (PRODOS): UNLOCK FRESH.MEAT Problem: FILE LOCKED error when trying to save the game. Fix: The Saved Game files on the disk are locked. These files are written to when the game is saved and must be unlocked. Type: (DOS 3.3): UNLOCK GAME.PTRS UNLOCK GAME.SVAR UNLOCK GAME.STR (ProDOS): UNLOCK SAVED.GAME Problem: REDIM'D ARRAY ERROR IN XXXX This is really a totally different bug that is being masked by sloppy programming. It happens when the adventure doesn't bother to disable the ONERR GOTO jump after checking for a saved game (this was a bug in the original version 5 SAVE routine and is common). Check and modify the saved game verification code in the program named MAIN PGM. It will be at lines 10-50 on most Eamons. The line numbers may be different in some Eamons; the first line will contain an ONERR GOTO statement. If there is no POKE 216,0 in Line 20, add one just before the GOTO statement. There are several variations on this line; here's one example of the original line: 20 DK$ = CHR$ (4): PRINT DK$"VERIFY GAME.PTRS": GOTO 29000 Change it to: 20 DK$ = CHR$ (4): PRINT DK$"VERIFY GAME.PTRS": POKE 216,0: GOTO 29000 There are many variations of this line in different Eamons. In the above example, I didn't change anything except to add the POKE statement. That's what you should do. If there's no POKE 216,0 in line 50, you should add one to the front of the line: Change: 50 GOTO 1000 to: 50 POKE 216,0: GOTO 1000 NOTE: As stated above, this error message is a symptom of a problem that is being masked. Once you add the POKE 216,0 statement, the adventure will still crash at the same point. But after the POKE has been added, you will get the correct error message. Problem: When restarting a saved game, it automatically tries to save the game before doing anything else. Fix: The DOS 3.3 Eamon SAVE routine does not want you to hit the key when answering the question "DO YOU WANT TO RESTART THIS GAME?" If you answer this question with "Y ", the "Y" is taken and the is left in the keyboard buffer to be taken as the first command. And since the last valid command was the SAVE command that saved off the game, it tries to save the game again. When playing DOS 3.3 Eamons, do not hit the key when answering "Y" to the "RESTART THIS GAME" question. If you forget and do it by mistake, simply answer "N" when asked "DO YOU WANT TO SAVE THIS GAME?" ProDOS note: this "feature" causes so much trouble for new Eamon players that all ProDOS versions were modified and do require that you hit the key when answering Save/Restart game questions. Warning: Any time you modify the MAIN PGM, a DOS 3.3 saved game will be dangerously unplayable. If you try to restart it, you will see bad room names and other weird stuff, and it will soon crash with a corrupted program in memory. Never, ever save the MAIN PGM to disk after seeing such a weird crash. This is how the corrupted MAIN PGMs mentioned in one of the above problems come about. ProDOS note: unlike DOS 3.3, it is OK to restart ProDOS saved games after modifying the MAIN.PGM. Problem: OUT OF MEMORY Fix: This error does not mean that you have run out of free memory. This error is also printed when something called a "stack overflow" occurs. Some Eamon adventures occasionally experience stack overflows because they were written using very poor programming practices. Normally you can immediately restart the adventure by typing this line at the keyboard: POKE 51,0:GOTO100 Sometimes it will crash a second time. Just type it in again. - - - - - - If you do find a genuine problem, please follow the steps outlined for SYNTAX ERROR above. I get an astonishing number of letters that say, "I bought your Eamon game, (name), and it crashes. What are you going to do about it?" Obviously, I can't do anything at all with that except write them back with some suggestions about bug reporting.