inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
4.07k stars 489 forks source link

Exception: choice out of range #845

Open guigamer00712 opened 1 year ago

guigamer00712 commented 1 year ago

I was trying to put in a system of choices and I ended up with this error: Exception: choice out of range Ink.Runtime.Story.Assert (System.Boolean condition, System.String message, System.Object[] formatParams) (at Assets/Ink/InkLibs/InkRuntime/Story.cs:2672) Ink.Runtime.Story.ChooseChoiceIndex (System.Int32 choiceIdx) (at Assets/Ink/InkLibs/InkRuntime/Story.cs:1663) DialogueSystem.MakeChoice (System.Int32 ChoiceIndex) (at Assets/Scripts/Dialogue System.cs:128) UnityEngine.Events.InvokableCall1[T1].Invoke (T1 args0) (at <cd86b0d4df634b6a8fd612065f941dcd>:0) UnityEngine.Events.CachedInvokableCall1[T].Invoke (System.Object[] args) (at :0) UnityEngine.Events.UnityEvent.Invoke () (at :0) UnityEngine.UI.Button.Press () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70) UnityEngine.UI.Button.OnSubmit (UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:150) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.ISubmitHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:134) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272) UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:530)