While deserializing quest tags, found a tag with a blank name in Start.

Announcements, support questions, and discussion for Quest Machine.
Post Reply
thaptam
Posts: 13
Joined: Wed Aug 07, 2019 12:31 pm

While deserializing quest tags, found a tag with a blank name in Start.

Post by thaptam »

Hi Tony Li,

I'm making the loading for my game and get the issue. My progress: get all the data from the journal and save it to the JSON file. Load JSON file and use ApplyData to the journal. I'm not sure what's wrong with the tag because I only use the internal name of the quest state. This issue stops me from continuing to play my quest. Here is the log file for debug:

Quest Machine: While deserializing quest tags, found a tag with a blank name in Start.
UnityEngine.Debug:LogWarning(Object)
PixelCrushers.QuestMachine.QuestStateSerializer:ReadTagDictionaryFromStream(BinaryReader, TagDictionary, String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Serialization/QuestStateSerializer.cs:201)
PixelCrushers.QuestMachine.QuestStateSerializer:ReadQuestNodeDataFromStream(BinaryReader, QuestNode) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Serialization/QuestStateSerializer.cs:182)
PixelCrushers.QuestMachine.QuestStateSerializer:ReadQuestDataFromStream(BinaryReader, Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Serialization/QuestStateSerializer.cs:170)
PixelCrushers.QuestMachine.QuestStateSerializer:DeserializeInto(Quest, Byte[], Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Serialization/QuestStateSerializer.cs:59)
PixelCrushers.QuestMachine.QuestListContainer:ApplyData(String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:361)
PixelCrushers.QuestMachine.QuestJournal:ApplyData(String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:174)
ThapTam.Game.<Loading>d__18:MoveNext() (at Assets/MAIN/Scripts/Controller/PlayerController.cs:183)
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: While deserializing quest tags, found a tag with a blank name in Start.

Post by Tony Li »

Hi,

Does Quest Machine's built-in save system work correctly with your quest(s)?

If so, then as a test try serializing your quest and then immediately deserializing it. Or call string s = QuestJournal.RecordData(), then immediately call QuestJournal.ApplyData(s).
thaptam
Posts: 13
Joined: Wed Aug 07, 2019 12:31 pm

Re: While deserializing quest tags, found a tag with a blank name in Start.

Post by thaptam »

The built-in save system worked normally when I updated the version of Unity from 2019.2.06f to 2019.2.21f1.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: While deserializing quest tags, found a tag with a blank name in Start.

Post by Tony Li »

Hmm, I wonder if a file got corrupted in your previous install or something like that. Is saving and loading working in your game now?
thaptam
Posts: 13
Joined: Wed Aug 07, 2019 12:31 pm

Re: While deserializing quest tags, found a tag with a blank name in Start.

Post by thaptam »

From what I remember, that issue usually happened during the time I tested the game after modifying a quest. Example steps:
1. Design a quest
2. Test it and save that
3. Back to edit that quest
4. Open the game and load that saved file. <= this time the issue happens
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: While deserializing quest tags, found a tag with a blank name in Start.

Post by Tony Li »

Thanks for those reproduction steps. I'll experiment with reproducing it using those steps. The next version shouldn't report the error anyway, since it should automatically take care of it.
Post Reply