Page 1 of 1

[SOLVED]GetQuestState Error

Posted: Tue Mar 03, 2020 9:19 am
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)

Re: GetQuestState Error

Posted: Tue Mar 03, 2020 9:57 am
by Tony Li
Hi,

Is the quest with ID 'killGreenGoblins' still in the quest database(s) that are assigned to the Quest Machine GameObject?

Re: GetQuestState Error

Posted: Wed Mar 04, 2020 9:27 am
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.

Re: [SOLVED]GetQuestState Error

Posted: Wed Mar 04, 2020 9:45 am
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.

Re: [SOLVED]GetQuestState Error

Posted: Thu Mar 05, 2020 8:40 am
by mschoenhals
Thank you. I believe I did use add all quests to current database.