Quest Bool Field not being recognized
Posted: Tue Feb 09, 2021 7:58 am
Hello, I've recently started implementing boolean variables inside my quests, because I want them to trigger different dialogue trees for multiple NPCs at once. However, I'm running into a problem.
At first I place the Boolean variable in the corresponding Quest's Fields. And then I try to invoke it like this (I know there's a typo on the print, I already fixed it).
However, I get the following error message:
So from what I understand, the system is treating the variable as if it doesn't exist... but it's right there! Am I doing something wrong while invoking it?
At first I place the Boolean variable in the corresponding Quest's Fields. And then I try to invoke it like this (I know there's a typo on the print, I already fixed it).
However, I get the following error message:
Code: Select all
Dialogue System: Lua code 'return Quest["Travel to the Heart"].Talk_to_P_Dro == false and CurrentQuestState("Travel to the Heart") == "active"' threw exception 'Lookup of field 'Talk_to_P_Dro' in the table element failed because the table element itself isn't in the table.'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:226)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:127)
PixelCrushers.DialogueSystem.Lua:IsTrue(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:169)
PixelCrushers.DialogueSystem.ConversationModel:EvaluateLinksAtPriority(ConditionPriority, DialogueEntry, List`1, List`1, List`1, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:378)
PixelCrushers.DialogueSystem.ConversationModel:EvaluateLinks(DialogueEntry, List`1, List`1, List`1, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:358)
PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry, Boolean, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:252)
PixelCrushers.DialogueSystem.ConversationModel:.ctor(DialogueDatabase, String, Transform, Transform, Boolean, IsDialogueEntryValidDelegate, Int32, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:127)
PixelCrushers.DialogueSystem.DialogueSystemController:ConversationHasValidEntry(String, Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:604)
PixelCrushers.DialogueSystem.DialogueManager:ConversationHasValidEntry(String, Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:343)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:DoConversationAction(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:829)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:Fire(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:619)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart(Transform, Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:601)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:587)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:OnUse(Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:468)
UnityEngine.GameObject:BroadcastMessage(String, Object, SendMessageOptions)
PixelCrushers.DialogueSystem.ProximitySelector:UseCurrentSelection() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Interaction/ProximitySelector.cs:246)
System.Reflection.MethodBase:Invoke(Object, Object[])
BetterEventEntry:Invoke() (at Assets/Scripts/External Scripts/Better Events/BetterEventEntry.cs:33)
BetterEvent:Invoke() (at Assets/Scripts/External Scripts/Better Events/BetterEvent.cs:16)
GameEventListener:OnEventRaised() (at Assets/Scripts/GameEvent/GameEventListener.cs:20)
GameEvent:Raise() (at Assets/Scripts/GameEvent/GameEvent.cs:17)
Interact_Component:InputWasPressed(PlayerAction) (at Assets/Interact_Component.cs:14)
Input_Component:AssignInput(PlayerAction, IInputHandler) (at Assets/Scripts/Input_Component.cs:115)
Input_Component:Update() (at Assets/Scripts/Input_Component.cs:63)