diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 5c88bdfe3..f0fcaf750 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -1129,6 +1129,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply { int rootnode = npc->ConversationRoot; const unsigned next = (unsigned)(rootnode + reply->NextNode - 1); + FString nextname = reply->NextNodeName; if (next < StrifeDialogues.Size()) { @@ -1149,7 +1150,10 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply } else { - Printf ("Next node %u is invalid, no such dialog page\n", next); + if (nextname.IsEmpty()) + Printf ("Next node %u is invalid, no such dialog page\n", next); + else + Printf ("Next node %u ('%s') is invalid, no such dialog page\n", next, nextname); } } diff --git a/src/p_usdf.cpp b/src/p_usdf.cpp index bbd64fdd4..dcbe59fe8 100644 --- a/src/p_usdf.cpp +++ b/src/p_usdf.cpp @@ -564,7 +564,10 @@ public: if (nameToIndex.CheckKey(key)) Printf("Warning! Duplicate page name '%s'!\n", StrifeDialogues[i]->ThisNodeName.GetChars()); else + { nameToIndex[key] = i; + DPrintf(DMSG_NOTIFY, "GZSDF linker: Assigning pagename '%s' to node %i\n", key, i); + } usedstrings = true; } } @@ -577,7 +580,10 @@ public: { itemLinkKey.ToLower(); if (nameToIndex.CheckKey(itemLinkKey)) + { StrifeDialogues[i]->ItemCheckNode = nameToIndex[itemLinkKey] + 1; + DPrintf(DMSG_NOTIFY, "GZSDF linker: Item Link '%s' in node %i was index %i\n", itemLinkKey, i, nameToIndex[itemLinkKey]); + } else Printf("Warning! Reference to non-existent item-linked dialogue page name '%s' in page %i!\n", StrifeDialogues[i]->ItemCheckNodeName.GetChars(), i); } @@ -590,7 +596,10 @@ public: FString key = NodeCheck->NextNodeName; key.ToLower(); if (nameToIndex.CheckKey(key)) + { NodeCheck->NextNode = nameToIndex[key] + 1; + DPrintf(DMSG_NOTIFY, "GZSDF linker: Nextpage Link '%s' in node %i was index %i\n", key, i, nameToIndex[key]); + } else Printf("Warning! Reference to non-existent reply-linked dialogue page name '%s' in page %i!\n", NodeCheck->NextNodeName.GetChars(), i); }