



CantSee (lines 3547-3585)
Back to List
Browsing parserm.h
3547 ! The CantSee routine returns a good error number for the situation where
3548 ! the last word looked at didn't seem to refer to any object in context.
3549 !
3550 ! The idea is that: if the actor is in a location (but not inside something
3551 ! like, for instance, a tank which is in that location) then an attempt to
3552 ! refer to one of the words listed as meaningful-but-irrelevant there
3553 ! will cause "you don't need to refer to that in this game" rather than
3554 ! "no such thing" or "what's 'it'?".
3555 ! (The advantage of not having looked at "irrelevant" local nouns until now
3556 ! is that it stops them from clogging up the ambiguity-resolving process.
3557 ! Thus game objects always triumph over scenery.)
3558 ! ----------------------------------------------------------------------------
3559
3560 [ CantSee i w e;
3561 saved_oops=oops_from;
3562
3563 if (scope_token ~= 0) {
3564 scope_error = scope_token;
3565 return ASKSCOPE_PE;
3566 }
3567
3568 wn--; w = NextWord();
3569 e = CANTSEE_PE;
3570 if (w == pronoun_word) {
3571 pronoun__word = pronoun_word; pronoun__obj = pronoun_obj;
3572 e = ITGONE_PE;
3573 }
3574 i = actor; while (parent(i) ~= 0) i = parent(i);
3575
3576 wn--;
3577 if (i has visited && Refers(i,wn) == 1) e = SCENERY_PE;
3578 else {
3579 Descriptors(); ! skip past THE etc
3580 if (i has visited && Refers(i,wn) == 1) e = SCENERY_PE;
3581 }
3582 wn++;
3583 if (etype > e) return etype;
3584 return e;
3585 ];
Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.