From: cohrs Date: Tue, 27 Aug 2002 03:56:28 +0000 (+0000) Subject: improperly terminated quest message X-Git-Tag: MOVE2GIT~2459 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=081edea253c4389e34d9551769bafaaf7de5d9f3;p=nethack improperly terminated quest message Add a missing check to makedefs so it prints a warning about misplaced %Es. Fix a couple places in quest.txt pointed out by the new warning. There's no visible effect on play, since the code that actually reads the message keeps reading until the next %C. --- diff --git a/dat/quest.txt b/dat/quest.txt index 963a603d9..1ae167cef 100644 --- a/dat/quest.txt +++ b/dat/quest.txt @@ -2658,7 +2658,6 @@ bad influences on your actions. Remember, only by following the %a path can you hope to overcome the obstacles you will face." %E %Cc Tou 00021 -%E "You have indeed proven yourself a worthy %c, %p. "But now your kinfolk and I must ask you to put aside your travels and @@ -2673,6 +2672,7 @@ and recover %o. "Do not be distracted on your quest. If you do not return quickly I fear that all will be lost. Let us both pray now that %d will guide you and keep you safe." +%E %Cp Tou 00025 "Do not be fooled by the false promises of %n." %E @@ -3153,7 +3153,6 @@ in ruins and simplify the task of %n. truly ready for this quest. May %d guide you in this task." %E %Cc Wiz 00021 -%E "Yes, %p, you truly are ready for this dire task. Listen, carefully, for what I tell you now will be of vital importance. @@ -3176,6 +3175,7 @@ shall soon perish. find and overcome %n, and return %o to me. "Go now, with %d, and complete this quest before it is too late." +%E %Cp Wiz 00025 "Beware, for %n is immune to most magical attacks." %E diff --git a/include/qtext.h b/include/qtext.h index 9ac4f16d6..28ff0bf62 100644 --- a/include/qtext.h +++ b/include/qtext.h @@ -35,6 +35,7 @@ struct qthdr { #define CREC_IN_MSG "Control record encountered during message - line %d\n" #define DUP_MSG "Duplicate message number at line %d\n" #define END_NOT_IN_MSG "End record encountered before message - line %d\n" +#define TEXT_NOT_IN_MSG "Text encountered outside message - line %d\n" #define UNREC_CREC "Unrecognized Control record at line %d\n" #define OUT_OF_HEADERS "Too many message types (line %d)\nAdjust N_HDR in qtext.h and recompile.\n" #define OUT_OF_MESSAGES "Too many messages in class (line %d)\nAdjust N_MSG in qtext.h and recompile.\n" diff --git a/util/makedefs.c b/util/makedefs.c index 7d8928841..21e09ae3a 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1511,6 +1511,9 @@ static void do_qt_text(s) char *s; { + if (!in_msg) { + Fprintf(stderr, TEXT_NOT_IN_MSG, qt_line); + } curr_msg->size += strlen(s); return; }