| Debugging Tips and Techniques |
Probably the least understood aspect of MUSH programming is how to debug stuff easily. MUSH code, because of it's formatting can be very hard to read, and almost impossible to debug if you're just missing one ) inside a very large function.
I'm sure most of you have worked on a IDE that uses syntax highlighting if you're into any sort of coding at all, you all know how useful it can be. Of course, MUSHes didn't have that -- till now. If you paste the following into your .tfrc (for tinyfugue users; others probably will have to modify this code) and then do line joins if necessary, you'll get some form of syntax highlighting.
/def hilight_cmd = /def -PBCmagenta -F -t"%1"
/def -F -PBCred -t'({|})'
/def -F -PBCyellow -t'(\[|\])'
/def -F -PBCgreen -t'(\(|\))'
/def -F -PBCcyan -t'(=|;|/|\%0|\%1|\%2|\%3|\%4|\%5|\%6|\%7|\%8|\%9|\%#|\%@|\%N)'
/def -F -PBCcyan -t'(\%r|\%b|\%t|\%s|\%p|\%o|\%!|\%l)'
/def -F -PBCcyan -t'(\%q0|\%q1|\%q2|\%q3|\%q4|\%q5|\%q6|\%q7|\%q8|\%q9)'
/def -F -PBCmagenta -t'(,)'
/hilight_cmd (@@|@allhalt|@allquota|@atrchown|@atrlock|@attribute|@boot|@cemit|@channel|@chat|@chown|@chownall|@chzone|@chzoneall|@clock|@clone|@command|@config|@cpattr|@create|@dbck|@decompile|@destroy|@dig|@disable|@doing|@dolist|@drain|@dump|@edit|@elock|@emit|@enable|@entrances|@eunlock)+
/hilight_cmd (@find|@firstexit|@fixdb|@force|@function|@gedit|@grep|@halt|@hide|@kick|@lemit|@link|@list|@listmotd|@lock|@log|@mail|@map|@motd|@mvattr|@name|@newpassword|@notify|@nuke|@oemit|@open|@parent|@password|@pcreate|@pemit|@poll|@poor|@power|@ps|@purge|@quota|@readcache|@recycle|@rejectmotd|@remit|@restart|@rwall|@rwallemit|@rwallpose)
/hilight_cmd (@scan|@search|@select|@set|@shutdown|@sitelock|@squota|@stats|@sweep|@switch|@teleport|@toad|@trigger|@ulock|@undestroy|@unlink|@unlock|@unrecycle|@uptime|@uunlock|@verb|@version|@wait|@wall|@wallemit|@wallpose|@warnings|@wcheck|@wipe)
/hilight_cmd (@wizemit|@wizmotd|@wizpose|@wizwall|@zemit|ahelp|anews|attrib_set|brief|drop|enter|examine|get|give|goto|help|inventory|kill|leave|look|move|news|page|pose|read|rob|rules|say|score|semipose|slay|swinfo|take|think|use|whisper)
/hilight_cmd (@desc|@dol|@sel|@fo)
You may also download just
the text to add to your .tfrc. (save it as a file and append it to your
.tfrc to 'install' it)
| Home | MUSH | Theory | Sitemap |