On Tue, 26 Nov 1996, Bruce, Ray, Phil wrote:
> Ok, I found where the problem is in my Major BUG.
> Its the FOR loop in this WHILE loop.
> But I have no clue what it means, I can barely read this thing...
> If anyone can tell me what its looking for? What it means in english?
> If you can read out the algorithm in english? I'm not wild with C, but
> I can usually get by, this is just a little too messy for me. I understand
> what its doing, but I have no clue WHAT those variables mean, if anyone
> does, it would be great if you could tell me what its looking up.
>
> **
> while (*(lbuf + ofs)) {
> log("Starting the say_spell while/for loop!");
> for (j = 0; *(syls[j].org); j++) {
> if (!strncmp(syls[j].org, lbuf + ofs, strlen(syls[j].org))) {
> strcat(buf, syls[j].new);
> ofs += strlen(syls[j].org);
> }
> }
> }
> **
Heh.. Seen this problem before..
look at 'struct syllable syls[] = {'
You will find a list over letter and words. These are for the crypting of
the spell name for others than the class.. Like a cleric cast 'heal', then
other classes see something like 'poir'
Your problem is that someone have either changed or removed a single
letter translation.. You have to have all letters from a to z in the list
or else it will end up in a loop..
If you want special "words" translated different than the single letter
translation. Then add on before the single letters!!!
---
Erik Niese-Petersen
Aka Quint The typo God
Realms of Darkness IMP
+-----------------------------------------------------------+
| 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