diff --git a/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t b/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t index d795780e3..510cc9a9b 100644 --- a/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t +++ b/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t @@ -1282,6 +1282,9 @@ communicates a snippet of words to another character, just as if the player had typed ANSWER ARFLE BARFLE GLOOP TO PERSON. For I7 purposes, the fake action |##NotUnderstood| does not exist. +In order to assist people who do want to parse that type of mistyped command +in extensions, wn is left pointing at the first misunderstood word. + = .GiveError; @@ -1291,6 +1294,7 @@ fake action |##NotUnderstood| does not exist. verb_wordnum = usual_grammar_after; jump AlmostReParse; } + m = wn; ! Save wn so extension authors can parse command errors if they want to wn = 1; while ((wn <= num_words) && (NextWord() ~= comma_word)) ; parser_results-->ACTION_PRES = ##Answer; @@ -1299,6 +1303,7 @@ fake action |##NotUnderstood| does not exist. parser_results-->INP2_PRES = 1; special_number1 = special_word; actor = player; consult_from = wn; consult_words = num_words-consult_from+1; + wn = m; ! Restore wn so extension authors can parse command errors if they want to rtrue; }