Page 1 of 1

Weird coding in verbstub.h (DoSearch)

Posted: Mon Jul 24, 2006 12:33 pm
by Merk

Code: Select all

    elseif object is living
    {
        print CThe(object); MatchPlural(object, "doesn't", "don't");
        " let ";
        The(player)
        if object.pronouns #2
        {
            " search ";
            if object.pronouns #2
                print object.pronouns #2;
            else
                print object.pronoun;
        }
        print "."
    }
In the part where it checks for object.pronouns #2, it has an interior part that again checks for object.pronoun #2. Since it can't be in that block otherwise, the second check (and resulting "else") seems unnecessary...

Posted: Tue Aug 08, 2006 1:29 pm
by Kent
It looks like I _may_ have intended "if object.pronouns" in the enclosing conditional. I'll have to look at this to see what the logic is in general.

Posted: Tue Aug 08, 2006 8:43 pm
by Merk
Ah. As-is, it just seemed like extra code.

It really helps my understanding of the library files when I have to dig in to see how something does/doesn't work. :)