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;
}