QM + UiS Item Amount Error

Announcements, support questions, and discussion for Quest Machine.
Post Reply
CruttMutt
Posts: 41
Joined: Wed May 06, 2020 9:44 am

QM + UiS Item Amount Error

Post by CruttMutt »

Helly Tony!

I am working on some quests and in one of my condition nodes I have set the condition to "UIS Item Amount" and input everything correctly but I get this error:
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.QuestMachine.UISSupport.UISItemAmountQuestCondition.IsTrue () (at Assets/Pixel Crushers/Quest Machine/Third Party Support/Opsive UIS Support/Scripts/Conditions/UISItemAmountQuestCondition.cs:76)
PixelCrushers.QuestMachine.UISSupport.UISItemAmountQuestCondition.StartChecking (System.Action trueAction) (at Assets/Pixel Crushers/Quest Machine/Third Party Support/Opsive UIS Support/Scripts/Conditions/UISItemAmountQuestCondition.cs:43)
PixelCrushers.QuestMachine.QuestConditionSet.StartChecking (System.Action trueAction) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Condition Set/QuestConditionSet.cs:128)
PixelCrushers.QuestMachine.QuestNode.SetConditionChecking (System.Boolean enable) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:490)
PixelCrushers.QuestMachine.QuestNode.SetState (PixelCrushers.QuestMachine.QuestNodeState newState, System.Boolean informListeners) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:412)
PixelCrushers.QuestMachine.QuestNode.OnParentStateChange (PixelCrushers.QuestMachine.QuestNode parent) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:514)
PixelCrushers.QuestMachine.QuestNode.SetState (PixelCrushers.QuestMachine.QuestNodeState newState, System.Boolean informListeners) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:431)
UnityEngine.Debug:LogException(Exception)
PixelCrushers.QuestMachine.QuestNode:SetState(QuestNodeState, Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:435)
PixelCrushers.QuestMachine.QuestNode:SetState(QuestNodeState, Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:445)
PixelCrushers.QuestMachine.Quest:SetState(QuestState, Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:886)
PixelCrushers.QuestMachine.QuestGiver:GiveQuestToQuester(Quest, QuestParticipantTextInfo, QuestListContainer) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:872)
PixelCrushers.QuestMachine.QuestGiver:OnAcceptQuest(Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:775)
PixelCrushers.QuestMachine.UnityUIQuestDialogueUI:AcceptQuest() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest UIs/Unity UI/Unity UI Quest Dialogue UI/UnityUIQuestDialogueUI.cs:230)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
InControl.InControlInputModule:ProcessMousePress(MouseButtonEventData) (at Assets/InControl/Source/GUI/InControlInputModule.cs:761)
InControl.InControlInputModule:ProcessMouseEvent(Int32) (at Assets/InControl/Source/GUI/InControlInputModule.cs:677)
InControl.InControlInputModule:ProcessMouseEvent() (at Assets/InControl/Source/GUI/InControlInputModule.cs:667)
InControl.InControlInputModule:Process() (at Assets/InControl/Source/GUI/InControlInputModule.cs:185)
UnityEngine.EventSystems.EventSystem:Update() (at C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:385)
I have everything filled out, and the Item Name is set to the Item Definition's name. Here's a little screenshot of everything on screen for reference. If you have a chance would be great to know if it's a bug or a bug in my head. Only comes up when I have the condition set and accept the quest.

Thanks!
Attachments
Troubleshoot.png
Troubleshoot.png (275.12 KiB) Viewed 2012 times
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: QM + UiS Item Amount Error

Post by Tony Li »

Hi,

This patch should address the issue:

QM_UISPatch_2021-07-19.unitypackage

Although the documentation states that assigning a counter is optional, prior to this patch the counter was mandatory. With this patch, you no longer need to assign a counter.
CruttMutt
Posts: 41
Joined: Wed May 06, 2020 9:44 am

Re: QM + UiS Item Amount Error

Post by CruttMutt »

Works perfectly and hassle-free. Thanks so much :D
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: QM + UiS Item Amount Error

Post by Tony Li »

Glad to help! Thanks for letting me know about the issue.
Post Reply