[Circle] A problem...

From: Francesco Munda (syylk@agw.flashnet.it)
Date: 11/12/96


Hiya, Implementors.

This is my first msg here - yet an important one. Please help me, if you can: I'm somewhat new to MUD coding.

I have played a bit with the code (added many races and some classes), and my compiler is configured to do highly specialized optimization on the preprocessed code, so maybe this is getting me far from perfect functionality.

My problem is weird: when I issue some command to the game, it process the string multiple times, as it won't stop when it'll find the correct command. It's a bit tricky to explain, so maybe an example could help.

When I want to (L)ook in the room, the easiest way to do it is to type:

[prompt] > l {CR}

And to expect the MUD engine to answer with the room description, but this isn't the case. It answer with the result of EVERY command starting with "l", as it doesn't stop the scan of the appropriate abbreviation, and continue processing every entry in the Master Command List (tm).

So the output for the previous example is the canonical output for "look" AND the output for every command (or social) starting with "l", as I had issued every "l"-starting command!!! Only with the full command name, it works as expected.

And if this is bad, the same applied to the second argument is even worse. Issuing:

[prompt] > look s {CR}

Will produce as result the usual report to the south direction, but also the description of everything whose name start with "s". Including the player character name (Syylk). Giving this "look s" command make the game answer with the output of:

"look s"
"look syylk"
"look sword"
"look shield"
"look staff"
...
"look s*" for short!!!

And this is NOT good at all.

Now the question: as I fear, this problem is the result for heavy fiddling with code or too-deep optimization by the compiler, okay. Acknowledged this, *WHERE* (what source, header, etc.) I have to search into to fix it? I mean: what chunk of code is supposed to STOP the scan of the MCL (tm) when it find correspondence between the (eventually abbreviated) command issued and the relative cmdname struct entry?

Please help me get rid of this nasty globbing behaviour!

Thanks in advance.

---
     /~/______________  ____
__  / // __/ / / / / / / / /     Francesco "Syylk" Munda
\ \/ / \_ \\  /\  / /_/   /   Team AMIGA - ATO - AmiGateWay
 \/_/ /___//_/ /_/___/_/\_\ Via R. Bracco 51 00137 Roma ITALY



+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST