[SOLVED] Cant find Quest

when I create a quest and try that the dialogue editor checks in which state of the progress it is I always get these errors. Everything else works. I copyed quest, quest list, quest status exacly and I dont know why it doesen work.


I tryed logging it and the name is goining through

Ok I fixed it with this simple statement that I added, what happend was:I didnt have any quest states so it returned null because nothing was in the foreach loop and Itried to check null. To fix it just add this statement, but maybe I am the only one with this error:

 public bool? Evaluate(string predicate, string[] parameters)
        {
            switch (predicate)
            {
                case "HasQuest":
                    return HasQuest(Quest.GetByName(parameters[0]));
                case "CompletedQuest":
                    QuestStatus status = GetQuestStatus(Quest.GetByName(parameters[0]));

                    if(status == null)
                    {
                        return false;
                    }

                    return status.IsComplete();
            }
            return null;
        }

Which statement did you add? I’m guessing

                    if(status == null)
                    {
                        return false;
                    }

as that would most likely deal with an issue where the quest does not exist, and a potential null reference.

Yes that was the Statement, with this it works

Or it doesent work… I dont know whats wrong now it is just selecting awnsers at random. It seems like it diesen know, that the quest exicests Event though I have it in a Ressource folder and it is named Swamp Donkey what am I suposed to Do?

Ok last comment. It know works I dont know why but I deleted my savefile all my quests and all my dialogues when I then created them again they worked.

It could have been corruption in the Save File (wrong or partial info saved when an error occurred). I’m glad you’re back on track.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms