[SOLVED]GetQuestState Error

Announcements, support questions, and discussion for Quest Machine.
Post Reply
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

[SOLVED]GetQuestState Error

Post by mschoenhals »

Hi,
I'm getting a weird error on a quest I made quite a while ago (the error just started showing up). I copied the whole error message below. I double checked the ID for the quest killGreenGoblins and it is spelled that way and is also in the database. What should I do to fix it?

Quest Machine: GetQuestState(killGreenGoblins): Couldn't find a quest with ID 'killGreenGoblins'.
UnityEngine.Debug:LogWarning(Object)
PixelCrushers.QuestMachine.QuestMachine:GetQuestState(String, String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest Machine/QuestMachine.cs:575)
PixelCrushers.QuestMachine.QuestMachine:GetQuestState(StringField) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest Machine/QuestMachine.cs:588)
PixelCrushers.QuestMachine.QuestStateQuestCondition:StartChecking(Action) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Subasset/Quest Condition/QuestStateQuestCondition.cs:51)
PixelCrushers.QuestMachine.QuestConditionSet:StartChecking(Action) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Condition Set/QuestConditionSet.cs:128)
PixelCrushers.QuestMachine.Quest:SetStartChecking(Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:735)
PixelCrushers.QuestMachine.Quest:SetState(QuestState, Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:812)
PixelCrushers.QuestMachine.QuestStateSerializer:ReadQuestDataFromStream(BinaryReader, Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Serialization/QuestStateSerializer.cs:159)
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.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:579)
PixelCrushers.SaveSystem:LoadGame(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:645)
PixelCrushers.SaveSystem:LoadFromSlotNow(Int32) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:502)
PixelCrushers.SaveSystem:LoadFromSlot(Int32) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:479)
PixelCrushers.AutoSaveLoad:Start() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/Misc/AutoSaveLoad.cs:41)
Last edited by mschoenhals on Wed Mar 04, 2020 9:27 am, edited 1 time in total.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: GetQuestState Error

Post by Tony Li »

Hi,

Is the quest with ID 'killGreenGoblins' still in the quest database(s) that are assigned to the Quest Machine GameObject?
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

Re: GetQuestState Error

Post by mschoenhals »

The error seems to be gone. I did have the quest in the quest database (checked that right away). When I restarted Unity, the error had disappeared.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: [SOLVED]GetQuestState Error

Post by Tony Li »

There is a bug in the current version that may have had an effect. If you clicked the 'Add All Quests In Scene' button on the quest database, in the current version it doesn't save those changes to disk. This is fixed in the upcoming version. In the meantime, you can add each quest manually instead of using the button.
mschoenhals
Posts: 118
Joined: Thu Dec 19, 2019 7:38 am

Re: [SOLVED]GetQuestState Error

Post by mschoenhals »

Thank you. I believe I did use add all quests to current database.
Post Reply