So I have a problem with the CompletedQuest predicate.
I have three different player options. First when he has completed the quest and two different ones without any predicate. but somehow he is always shooting me this mistake.
NullReferenceException: Object reference not set to an instance of an object
RPG.Quests.QuestList.Evaluate (System.String predicate, System.String parameters) (at Assets/Scripts/Quests/QuestList.cs:107)
public bool? Evaluate(string predicate, string[] parameters)
{
switch (predicate)
{
case "HasQuest":
return HasQuest(Quest.GetByName(parameters[0]));
case "CompletedQuest":
return GetQuestStatus(Quest.GetByName(parameters[0])).IsComplete();
}
return null;
}
}