The ScoreMatchL() routine in Parserm.h incorrectly decides which objects meet
descriptors. As a result, some objects that don't meet descriptors are not
properly removed from the match list when the library is deciding which
objects best match a player's input.
Here is a short transcript demonstrating the bug: The steel lantern was correctly removed from the match list, but the copper
lantern was not -- since they are both unlit, they should have removed. At this point, the library haphazardly chose the first object of those
remaining in the match list, since it considers them indistinguishable.
Ironically, the library is guaranteed to guess correctly. That's probably
why this bug isn't fixed yet. The correct transcript would be: Both of the unlit lanterns are removed from the match list, so there is no
ambiguity, and the parser does not need to guess. It's a simple case of a variable not being reset to zero on subsequent
iterations. After Parserm.h lines 2618-2619, add the line: The only functioning descriptors in the standard English version of the
Inform library are 'lit' and 'unlit'. Foreign language editions of the
library most likely define many more of them, and so they are more
susceptible to this bug. What I’m writing to emphasize is that this is a -BIG- bug
and it will screw up ambiguous matching of almost any sort,
failing to exclude objects which are clearly not matches.
Example: If you have an animate, and you do: And you also have a pen in your inventory,
the fact that met is not set back to 0 will cause your pen AND his pen to both be considered,
at which point your pen will be scored 20 higher than his pen because it is in your inventory
and will end up being the target of the action.
With met=0 at the beginning of each new iteration, your pen fails to meet the criteria
(belonging to the pronoun him), and is correctly excluded.
About Patches
Issue L61013
Match list handled incorrectly
Submitted by: Neil Cerutti
Appeared in: Library 6/10 or before
Fixed in: Library 6/11
Problem
>INV
You are carrying:
A steel lantern
A brass lantern (providing light)
A copper lantern
>DROP LIT LANTERN
(the brass lantern)
Dropped.
>DROP LIT LANTERN
Dropped.
Solution
for (i=0: i<number_matched: i++) {
obj = match_list-->i; its_owner = parent(obj); its_score=0;
met = 0;
Update (by Sabrejack)
>x his pen
Last updated 17 April 2013.
This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation.
Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.