ds2.9a12/bin/
ds2.9a12/extra/
ds2.9a12/extra/crat/
ds2.9a12/extra/creremote/
ds2.9a12/extra/mingw/
ds2.9a12/extra/wolfpaw/
ds2.9a12/fluffos-2.14-ds13/
ds2.9a12/fluffos-2.14-ds13/Win32/
ds2.9a12/fluffos-2.14-ds13/compat/
ds2.9a12/fluffos-2.14-ds13/compat/simuls/
ds2.9a12/fluffos-2.14-ds13/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/
ds2.9a12/fluffos-2.14-ds13/testsuite/clone/
ds2.9a12/fluffos-2.14-ds13/testsuite/command/
ds2.9a12/fluffos-2.14-ds13/testsuite/data/
ds2.9a12/fluffos-2.14-ds13/testsuite/etc/
ds2.9a12/fluffos-2.14-ds13/testsuite/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/master/
ds2.9a12/fluffos-2.14-ds13/testsuite/log/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/compiler/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/efuns/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/operators/
ds2.9a12/fluffos-2.14-ds13/testsuite/u/
ds2.9a12/lib/cmds/admins/
ds2.9a12/lib/cmds/common/
ds2.9a12/lib/cmds/creators/include/
ds2.9a12/lib/daemon/services/
ds2.9a12/lib/daemon/tmp/
ds2.9a12/lib/doc/
ds2.9a12/lib/doc/bguide/
ds2.9a12/lib/doc/efun/all/
ds2.9a12/lib/doc/efun/arrays/
ds2.9a12/lib/doc/efun/buffers/
ds2.9a12/lib/doc/efun/compile/
ds2.9a12/lib/doc/efun/floats/
ds2.9a12/lib/doc/efun/functions/
ds2.9a12/lib/doc/efun/general/
ds2.9a12/lib/doc/efun/mixed/
ds2.9a12/lib/doc/efun/numbers/
ds2.9a12/lib/doc/efun/parsing/
ds2.9a12/lib/doc/hbook/
ds2.9a12/lib/doc/help/classes/
ds2.9a12/lib/doc/help/races/
ds2.9a12/lib/doc/lfun/
ds2.9a12/lib/doc/lfun/all/
ds2.9a12/lib/doc/lfun/lib/abilities/
ds2.9a12/lib/doc/lfun/lib/armor/
ds2.9a12/lib/doc/lfun/lib/bank/
ds2.9a12/lib/doc/lfun/lib/bot/
ds2.9a12/lib/doc/lfun/lib/clay/
ds2.9a12/lib/doc/lfun/lib/clean/
ds2.9a12/lib/doc/lfun/lib/clerk/
ds2.9a12/lib/doc/lfun/lib/client/
ds2.9a12/lib/doc/lfun/lib/combat/
ds2.9a12/lib/doc/lfun/lib/connect/
ds2.9a12/lib/doc/lfun/lib/container/
ds2.9a12/lib/doc/lfun/lib/corpse/
ds2.9a12/lib/doc/lfun/lib/creator/
ds2.9a12/lib/doc/lfun/lib/daemon/
ds2.9a12/lib/doc/lfun/lib/damage/
ds2.9a12/lib/doc/lfun/lib/deterioration/
ds2.9a12/lib/doc/lfun/lib/donate/
ds2.9a12/lib/doc/lfun/lib/door/
ds2.9a12/lib/doc/lfun/lib/equip/
ds2.9a12/lib/doc/lfun/lib/file/
ds2.9a12/lib/doc/lfun/lib/fish/
ds2.9a12/lib/doc/lfun/lib/fishing/
ds2.9a12/lib/doc/lfun/lib/flashlight/
ds2.9a12/lib/doc/lfun/lib/follow/
ds2.9a12/lib/doc/lfun/lib/ftp_client/
ds2.9a12/lib/doc/lfun/lib/ftp_data_connection/
ds2.9a12/lib/doc/lfun/lib/fuel/
ds2.9a12/lib/doc/lfun/lib/furnace/
ds2.9a12/lib/doc/lfun/lib/genetics/
ds2.9a12/lib/doc/lfun/lib/holder/
ds2.9a12/lib/doc/lfun/lib/id/
ds2.9a12/lib/doc/lfun/lib/interactive/
ds2.9a12/lib/doc/lfun/lib/lamp/
ds2.9a12/lib/doc/lfun/lib/leader/
ds2.9a12/lib/doc/lfun/lib/light/
ds2.9a12/lib/doc/lfun/lib/limb/
ds2.9a12/lib/doc/lfun/lib/living/
ds2.9a12/lib/doc/lfun/lib/load/
ds2.9a12/lib/doc/lfun/lib/look/
ds2.9a12/lib/doc/lfun/lib/manipulate/
ds2.9a12/lib/doc/lfun/lib/meal/
ds2.9a12/lib/doc/lfun/lib/messages/
ds2.9a12/lib/doc/lfun/lib/player/
ds2.9a12/lib/doc/lfun/lib/poison/
ds2.9a12/lib/doc/lfun/lib/position/
ds2.9a12/lib/doc/lfun/lib/post_office/
ds2.9a12/lib/doc/lfun/lib/potion/
ds2.9a12/lib/doc/lfun/lib/room/
ds2.9a12/lib/doc/lfun/lib/server/
ds2.9a12/lib/doc/lfun/lib/spell/
ds2.9a12/lib/doc/lfun/lib/torch/
ds2.9a12/lib/doc/lfun/lib/vendor/
ds2.9a12/lib/doc/lfun/lib/virt_sky/
ds2.9a12/lib/doc/lfun/lib/weapon/
ds2.9a12/lib/doc/lfun/lib/worn_storage/
ds2.9a12/lib/doc/lpc/basic/
ds2.9a12/lib/doc/lpc/concepts/
ds2.9a12/lib/doc/lpc/constructs/
ds2.9a12/lib/doc/lpc/etc/
ds2.9a12/lib/doc/lpc/intermediate/
ds2.9a12/lib/doc/lpc/types/
ds2.9a12/lib/doc/misc/
ds2.9a12/lib/doc/old/
ds2.9a12/lib/domains/
ds2.9a12/lib/domains/Praxis/adm/
ds2.9a12/lib/domains/Praxis/attic/
ds2.9a12/lib/domains/Praxis/cemetery/mon/
ds2.9a12/lib/domains/Praxis/data/
ds2.9a12/lib/domains/Praxis/death/
ds2.9a12/lib/domains/Praxis/mountains/
ds2.9a12/lib/domains/Praxis/obj/armour/
ds2.9a12/lib/domains/Praxis/obj/magic/
ds2.9a12/lib/domains/Praxis/obj/weapon/
ds2.9a12/lib/domains/Praxis/orc_valley/
ds2.9a12/lib/domains/Ylsrim/
ds2.9a12/lib/domains/Ylsrim/adm/
ds2.9a12/lib/domains/Ylsrim/armor/
ds2.9a12/lib/domains/Ylsrim/broken/
ds2.9a12/lib/domains/Ylsrim/fish/
ds2.9a12/lib/domains/Ylsrim/meal/
ds2.9a12/lib/domains/Ylsrim/npc/
ds2.9a12/lib/domains/Ylsrim/obj/
ds2.9a12/lib/domains/Ylsrim/virtual/
ds2.9a12/lib/domains/Ylsrim/weapon/
ds2.9a12/lib/domains/campus/adm/
ds2.9a12/lib/domains/campus/etc/
ds2.9a12/lib/domains/campus/meals/
ds2.9a12/lib/domains/campus/save/
ds2.9a12/lib/domains/campus/txt/ai/charles/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/bak1/
ds2.9a12/lib/domains/campus/txt/ai/charly/
ds2.9a12/lib/domains/campus/txt/ai/charly/bak/
ds2.9a12/lib/domains/campus/txt/jenny/
ds2.9a12/lib/domains/cave/doors/
ds2.9a12/lib/domains/cave/etc/
ds2.9a12/lib/domains/cave/meals/
ds2.9a12/lib/domains/cave/weap/
ds2.9a12/lib/domains/default/creator/
ds2.9a12/lib/domains/default/doors/
ds2.9a12/lib/domains/default/etc/
ds2.9a12/lib/domains/default/vehicles/
ds2.9a12/lib/domains/default/virtual/
ds2.9a12/lib/domains/default/weap/
ds2.9a12/lib/domains/town/txt/shame/
ds2.9a12/lib/domains/town/virtual/
ds2.9a12/lib/domains/town/virtual/bottom/
ds2.9a12/lib/domains/town/virtual/space/
ds2.9a12/lib/estates/
ds2.9a12/lib/ftp/
ds2.9a12/lib/lib/comp/
ds2.9a12/lib/lib/daemons/
ds2.9a12/lib/lib/daemons/include/
ds2.9a12/lib/lib/lvs/
ds2.9a12/lib/lib/user/
ds2.9a12/lib/lib/virtual/
ds2.9a12/lib/log/
ds2.9a12/lib/log/adm/
ds2.9a12/lib/log/archive/
ds2.9a12/lib/log/chan/
ds2.9a12/lib/log/errors/
ds2.9a12/lib/log/law/adm/
ds2.9a12/lib/log/law/email/
ds2.9a12/lib/log/law/names/
ds2.9a12/lib/log/law/sites-misc/
ds2.9a12/lib/log/law/sites-register/
ds2.9a12/lib/log/law/sites-tempban/
ds2.9a12/lib/log/law/sites-watch/
ds2.9a12/lib/log/open/
ds2.9a12/lib/log/reports/
ds2.9a12/lib/log/router/
ds2.9a12/lib/log/secure/
ds2.9a12/lib/log/watch/
ds2.9a12/lib/obj/book_source/
ds2.9a12/lib/obj/include/
ds2.9a12/lib/powers/prayers/
ds2.9a12/lib/powers/spells/
ds2.9a12/lib/realms/template/adm/
ds2.9a12/lib/realms/template/area/armor/
ds2.9a12/lib/realms/template/area/npc/
ds2.9a12/lib/realms/template/area/obj/
ds2.9a12/lib/realms/template/area/room/
ds2.9a12/lib/realms/template/area/weap/
ds2.9a12/lib/realms/template/bak/
ds2.9a12/lib/realms/template/cmds/
ds2.9a12/lib/save/kills/o/
ds2.9a12/lib/secure/cfg/classes/
ds2.9a12/lib/secure/cmds/builders/
ds2.9a12/lib/secure/cmds/creators/include/
ds2.9a12/lib/secure/cmds/players/
ds2.9a12/lib/secure/cmds/players/include/
ds2.9a12/lib/secure/daemon/imc2server/
ds2.9a12/lib/secure/daemon/include/
ds2.9a12/lib/secure/lib/
ds2.9a12/lib/secure/lib/include/
ds2.9a12/lib/secure/lib/net/include/
ds2.9a12/lib/secure/lib/std/
ds2.9a12/lib/secure/log/adm/
ds2.9a12/lib/secure/log/bak/
ds2.9a12/lib/secure/log/intermud/
ds2.9a12/lib/secure/log/network/
ds2.9a12/lib/secure/modules/
ds2.9a12/lib/secure/npc/
ds2.9a12/lib/secure/obj/include/
ds2.9a12/lib/secure/room/
ds2.9a12/lib/secure/save/
ds2.9a12/lib/secure/save/backup/
ds2.9a12/lib/secure/save/boards/
ds2.9a12/lib/secure/tmp/
ds2.9a12/lib/secure/upgrades/files/
ds2.9a12/lib/secure/verbs/creators/
ds2.9a12/lib/std/board/
ds2.9a12/lib/std/lib/
ds2.9a12/lib/tmp/
ds2.9a12/lib/verbs/admins/include/
ds2.9a12/lib/verbs/builders/
ds2.9a12/lib/verbs/common/
ds2.9a12/lib/verbs/common/include/
ds2.9a12/lib/verbs/creators/
ds2.9a12/lib/verbs/creators/include/
ds2.9a12/lib/verbs/rooms/
ds2.9a12/lib/verbs/rooms/include/
ds2.9a12/lib/www/client/
ds2.9a12/lib/www/errors/
ds2.9a12/lib/www/images/
ds2.9a12/lib/www/lpmuds/downloads_files/
ds2.9a12/lib/www/lpmuds/intermud_files/
ds2.9a12/lib/www/lpmuds/links_files/
ds2.9a12/win32/
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>Dead Souls debugging</title>
  <link rel="icon" href="./favicon.ico" type="image/x-icon">
  <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
</head>
<body>
<big style="font-family: courier new,courier,monospace;"><big><big><span
 style="font-weight: bold;">Debugging
in Dead Souls</span></big></big></big><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">So you've
made some cool stuff but darn it, it doesn't work. There are
various</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">tools
available in the Dead Souls lib to hunt down the source of the
problem:</span><br style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<a style="font-family: courier new,courier,monospace;" href="#1">1 elog</a><br
 style="font-family: courier new,courier,monospace;">
<a style="font-family: courier new,courier,monospace;" href="#2">2
dbxframe and dbxwhere</a><br
 style="font-family: courier new,courier,monospace;">
<a style="font-family: courier new,courier,monospace;" href="#3">3
tell_player() and debug()</a><br
 style="font-family: courier new,courier,monospace;">
<a style="font-family: courier new,courier,monospace;" href="#4">4 tail</a><br
 style="font-family: courier new,courier,monospace;">
<a style="font-family: courier new,courier,monospace;" href="#5">5 bk
and restore</a><br style="font-family: courier new,courier,monospace;">
<br>
<br style="font-family: courier new,courier,monospace;">
<big style="font-family: courier new,courier,monospace;"><big
 style="font-weight: bold; text-decoration: underline;"><big><a name="1"></a>elog</big></big></big><br
 style="font-family: courier new,courier,monospace;">
<pre style="font-family: courier new,courier,monospace;"><big>If the file is somewhere in your home directory, just type: <span
 style="font-weight: bold;">elog</span> <br><br>This will provide you a listing of the last few lines of your personal<br>error log. Warning lines tell you about code that works but should<br>be fixed in some way. Lines that don't contain the word "Warning" are<br>error lines: they indicate something about your code that prevents<br>it from working. For example:<br><br></big></pre>
<hr
 style="width: 100%; height: 2px; font-family: courier new,courier,monospace;"><span
 style="font-family: courier new,courier,monospace;">&gt; </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">update
sample_room</span><br
 style="font-family: courier new,courier,monospace;">
<pre style="font-family: courier new,courier,monospace;"><big><span
 style="font-style: italic;"></span><span style="font-style: italic;">---<br>*Error in loading object '/realms/cratylus/area/room/sample_room'<br>Object: /secure/cmds/creators/update at line 148<br><br>'&lt;function&gt;' at /secure/save/creators/c/cratylus (&lt;function&gt;) at /:0<br>'cmdAll' at /secure/save/creators/c/cratylus (/lib/command.c) at line 84<br>'cmd' at /secure/cmds/creators/update at line 109<br>'eventUpdate' at /secure/cmds/creators/update at line 148<br>'CATCH' at /secure/cmds/creators/update at line 148<br>Trace written to /log/catch<br>/realms/cratylus/area/room/sample_room: Error in update<br>*Error in loading object '/realms/cratylus/area/room/sample_room'<br></span></big></pre>
<hr
 style="width: 100%; height: 2px; font-family: courier new,courier,monospace;">
<pre style="font-family: courier new,courier,monospace;"><big><span
 style="font-style: italic;"><br></span><br>	This output lets you know something is wrong, but<br>isn't very specific as to exactly what. If you look at your error<br>log, you probably will see something more detailed and helpful:<br><br><br></big></pre>
<hr
 style="width: 100%; height: 2px; font-family: courier new,courier,monospace;"><span
 style="font-family: courier new,courier,monospace;">&gt; </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">elog</span><br
 style="font-family: courier new,courier,monospace;">
<pre style="font-family: courier new,courier,monospace;"><big><span
 style="font-style: italic;">/log/errors/cratylus:</span><br
 style="font-style: italic;"><br style="font-style: italic;"><span
 style="font-style: italic;"></span><span style="font-style: italic;">/realms/cratylus/area/room/sample_room.c line 10: Undefined variable 'Sample'<br>/realms/cratylus/area/room/sample_room.c line 10: parse error<br></span></big></pre>
<hr
 style="width: 100%; height: 2px; font-family: courier new,courier,monospace;">
<pre style="font-family: courier new,courier,monospace;"><big><span
 style="font-style: italic;"><br></span><br>	Now you can see that the error is my syntax on<br>line 10. I would then use ed to examine the code, and specifically lines 9<br>through 11. It turns out that I forgot to put quotes around the room name, <br>so the parser tried to use it as a variable, which, of course, it couldn't.<br><br>	If the file in question is in /secure, you'd type <span
 style="font-weight: bold;">elog secure</span> , or if<br>it's in /cmds, <span
 style="font-weight: bold;">elog cmds</span> , and so on.<br><span
 style="font-weight: bold;"><br>	</span></big><br><big><big
 style="font-weight: bold; text-decoration: underline;"><big><a name="2"></a></big></big></big><big><big
 style="font-weight: bold; text-decoration: underline;"><big>dbxwhere</big></big></big><big><big
 style="font-weight: bold; text-decoration: underline;"><big> &amp; dbxframe</big></big><span
 style="font-weight: bold;"><br></span></big><big><span
 style="font-weight: bold;"></span></big><big><span
 style="font-weight: bold;"><br>	</span>Two<span
 style="font-weight: bold;"> </span>helpful debugging commands are dbxframe and dbxwhere. Let's<br>take a look at my broken sample_room.c file. We'll start with dbxwhere,<br>which lists for us the chain of events that led to the error. The<br>individual steps are called frames.<br><br>&gt; <span
 style="font-weight: bold;">dbxwhere</span><br>*Error in loading object '/realms/cratylus/area/room/sample_room'<br>Object: /secure/cmds/creators/update at line 148<br><br>#0: '&lt;function&gt;' at /secure/save/creators/c/cratylus (&lt;function&gt;) at /:0<br>#1: 'cmdAll' at /secure/save/creators/c/cratylus (/lib/command.c) at line 84<br>#2: 'cmd' at /secure/cmds/creators/update at line 109<br>#3: 'eventUpdate' at /secure/cmds/creators/update at line 148<br>#4: 'CATCH' at /secure/cmds/creators/update at line 148<br></big></pre>
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">The output is
similar to the update error we saw above, but in
enumerating the steps, </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">dbxwhere</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">lets us use </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">dbxframe</span><span
 style="font-family: courier new,courier,monospace;"> to get
tighter detail on a given error frame:</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&gt; </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">dbxframe
4</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">------</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
/secure/cmds/creators/update.c:148 - CATCH(0)</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
----------------------------------------------------------------</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if( args == base_name(this_object()) ) {</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
this_player()-&gt;eventPrint("Cannot reload update after destruct.\n"</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"It will be reloaded at next reference.");</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return 0;</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
=&gt;&nbsp;
tmp = catch(call_other(args, "???"));</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if( !tmp ) {</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if(identify(flags ^ U_AUTOMATED) ==</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
"8")this_player()-&gt;eventPrint(args + ": Ok");</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return 1;</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} else this_player()-&gt;eventPrint(args + ": Error in update\n" + tmp);</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return 0;</span><br style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
We're now looking at the error context for error
frame 4. The output of the command shows</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">us part of
the file that was performing the evaluation when the error
occurred, and even</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">points out
the offending line using a text arrow: =&gt;</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
In this particular case, the information is not that
helpful. We are being told that</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">the error
occurred while we were using the update command, and it
failed at the line</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">where update
does its thing. Duh, we knew that. The </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">elog</span><span
 style="font-family: courier new,courier,monospace;"> command was much
more helpful.</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
Where this kind of tracing comes in handy is when
you encounter a runtime error</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">when you're
not updating a file. For example, if I tried to enter that
room, rather than</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">update it,
I'd get a big pukey error message and not know why. If you
run into an</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">unexpected
error, </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">dbxwhere</span><span
 style="font-family: courier new,courier,monospace;">
will help you pinpoint it if </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">elog</span><span
 style="font-family: courier new,courier,monospace;">
doesn't provide useful information,</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">and </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">dbxframe</span><span
 style="font-family: courier new,courier,monospace;"> will help detail
the source of the problem.<br>
<br>
<big><big><br>
<big><span style="font-weight: bold; text-decoration: underline;"></span></big></big></big></span><big
 style="font-family: courier new,courier,monospace;"><big
 style="font-weight: bold; text-decoration: underline;"><big><a name="3"></a></big></big></big><span
 style="font-family: courier new,courier,monospace;"><big><big><big><span
 style="font-weight: bold; text-decoration: underline;">tell_player(),
debug()</span></big></big></big><br>
<br>
&nbsp;&nbsp;&nbsp; Sometimes it's hard to fix code if you don't know
what it's doing. In<br>
the above example, you might want to know what the variable "args" is,
if<br>
your code is behaving unexpectedly. You could find out by adding a line
like:<br>
<br>
<span style="color: rgb(0, 0, 153);">tell_player("cratylus", "args is:
"+identify(args));<br>
<br>
<span style="color: rgb(0, 0, 0);">or:</span><br>
<br>
</span><span style="color: rgb(0, 0, 153);">tell_player("cratylus",
"%^BLUE%^args
is: "+identify(args)+"%^RESET%^");</span></span><br
 style="color: rgb(0, 0, 153); font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;"><span
 style="color: rgb(0, 0, 153);"></span><br>
&nbsp;&nbsp;&nbsp; You could also use:<br>
<br>
<span style="color: rgb(0, 0, 153);">debug("args is: ", args);<br>
<br>
<span style="color: rgb(0, 0, 0);">or:</span><br>
<br>
</span><span style="color: rgb(0, 0, 153);">debug("args is: ", args,
"blue");</span></span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;"><span
 style="color: rgb(0, 0, 153);"></span><br>
&nbsp;&nbsp;&nbsp; ...which has the advantage of being shorter to type
and you'll get<br>
the message more promptly. To be able to receive debug messages,<br>
you need to enable your debugging mode by typing:<br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">debug on</span><br>
<br>
&nbsp;&nbsp;&nbsp; debug() is available in 2.0r20 and above.<br>
</span><br style="font-family: courier new,courier,monospace;">
<pre
 style="font-weight: bold; text-decoration: underline; font-family: courier new,courier,monospace;"><big><big
 style="font-weight: bold; text-decoration: underline;"><big><a name="4"></a></big></big></big><big><big><big>tail</big></big></big></pre>
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
This is a version of the unix tail command. It
displays the last few lines of a file. </span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">This command
is important for examining crucial log files:</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">tail
/log/catch</span><big
 style="font-family: courier new,courier,monospace;"><br>
<small style="font-weight: bold;">tail /log/runtime<br>
</small></big><big style="font-family: courier new,courier,monospace;"><small
 style="font-weight: bold;">tail
/log/player_errors<br>
<br>
<br>
</small></big><big style="font-family: courier new,courier,monospace;"><big
 style="font-weight: bold; text-decoration: underline;"><big><a name="5"></a></big></big></big><big
 style="text-decoration: underline; font-family: courier new,courier,monospace;"><big><big><span
 style="font-weight: bold;">bk
&amp; restore</span><br>
<br>
</big></big></big><span
 style="font-family: courier new,courier,monospace;">These commands
aren't so much for debugging as they
are for safe coding. Before you</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">edit a file,
it is a very good idea to back it up first. The </span><span
 style="font-weight: bold; font-family: courier new,courier,monospace;">bk</span><span
 style="font-family: courier new,courier,monospace;"> command lets you</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">quickly and
conveniently back up a file before you edit it. When I
typed:</span><br style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">bk
sample_room</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">A file with a
unique identifying number was created in my bak/
directory. If I</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">were to type
it again, then sample_room.c would get copied again to
bak/, with</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">a new unique
number added to the name.</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
The number is basically the number of seconds
elapsed since January 1, 1970.</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">Adding this
number, we can keep track of which backed up version of a
file</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">is most
recent by looking at the name.</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
Suppose I edited a file called sample_npc.c. I use
bk to back it up, make some changes,</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">then use bk
again, make some more changes, but now it won't update. I
don't</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">feel like
debugging, I just need this file working again, so I want to
restore from</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">backup. The
sequence of commands would look something like this:</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">ed
sample_npc.c</span><br
 style="font-weight: bold; font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">bk
sample_npc</span><br
 style="font-weight: bold; font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">ed
sample_npc.c</span><br
 style="font-weight: bold; font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">update
sample_npc.c</span><br
 style="font-family: courier new,courier,monospace;">
<span
 style="color: rgb(204, 0, 0); font-family: courier new,courier,monospace;">&lt;error
occurs here&gt;</span><br
 style="font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">restore
sample_npc</span><br style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
The reason identifying numbers are used is that you
can also choose to</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">restore the
second-to-last backup version of a file, and other previous</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">versions.</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
The very last backup version is effectively version
0, so it's not</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">necessary to
specify a number. If I wanted to restore the version I
backed</span><br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">up before
that one, I would type something like this:</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span
 style="font-weight: bold; font-family: courier new,courier,monospace;">restore
sample_npc 1</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
And if I wanted the version before that one, I'd
specify 2 instead of 1, </span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">and so on.</span><br
 style="font-family: courier new,courier,monospace;">
<br style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">&nbsp;&nbsp;&nbsp;
Please note that this is an intentionally simple
system. There are</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">no menus, no
version branches, or diff tracking. The reason for this is</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">that it is
not a </span><span
 style="font-style: italic; font-family: courier new,courier,monospace;">versioning</span><span
 style="font-family: courier new,courier,monospace;">
system. It is a </span><span
 style="font-style: italic; font-family: courier new,courier,monospace;">backup</span><span
 style="font-family: courier new,courier,monospace;">
system. It is a convenient</span><br
 style="font-family: courier new,courier,monospace;">
<span style="font-family: courier new,courier,monospace;">tool to back
out of screwups, not a development tool to test file
versions.</span><br style="font-family: courier new,courier,monospace;">
<big style="font-family: courier new,courier,monospace;"><small
 style="font-weight: bold;"><br>
<br>
</small></big><a style="font-family: courier new,courier,monospace;"
 href="index.html">Dead Souls Homepage</a><br
 style="font-family: courier new,courier,monospace;">
<big style="font-family: courier new,courier,monospace;"><small
 style="font-weight: bold;"><br>
<br>
</small></big>
</body>
</html>