playMaker

Author Topic: Array List Sort Error  (Read 269 times)

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Array List Sort Error
« on: October 17, 2023, 10:34:04 PM »
I'm attempting to use the "Array List Sort" action but I get this error when calling it.

ArgumentException: At least one object must implement IComparable.
System.Collections.Comparer.Compare (System.Object a, System.Object b) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Array+SorterObjectArray.SwapIfGreaterWithItems (System.Int32 a, System.Int32 b) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Array+SorterObjectArray.IntroSort (System.Int32 lo, System.Int32 hi, System.Int32 depthLimit) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Array+SorterObjectArray.IntrospectiveSort (System.Int32 left, System.Int32 length) (at <605bf8b31fcb444b85176da963870aa7>:0)
Rethrow as InvalidOperationException: Failed to compare two elements in the array.
System.Array+SorterObjectArray.IntrospectiveSort (System.Int32 left, System.Int32 length) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Array+SorterObjectArray.Sort (System.Int32 left, System.Int32 length) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Array.SortImpl (System.Array keys, System.Array items, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Array.Sort (System.Array keys, System.Array items, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Array.Sort (System.Array array, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Collections.ArrayList.Sort (System.Int32 index, System.Int32 count, System.Collections.IComparer comparer) (at <605bf8b31fcb444b85176da963870aa7>:0)
System.Collections.ArrayList.Sort () (at <605bf8b31fcb444b85176da963870aa7>:0)
HutongGames.PlayMaker.Actions.ArrayListSort.DoArrayListSort () (at Assets/PlayMaker ArrayMaker/Actions/ArrayList/ArrayListSort.cs:48)
HutongGames.PlayMaker.Actions.ArrayListSort.OnEnter () (at Assets/PlayMaker ArrayMaker/Actions/ArrayList/ArrayListSort.cs:37)
HutongGames.PlayMaker.FsmState.ActivateActions (System.Int32 startIndex) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:229)
HutongGames.PlayMaker.FsmState.OnEnter () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:199)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:3096)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:3035)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2968)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:3112)
HutongGames.PlayMaker.Fsm.Update () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2255)
PlayMakerFSM.Update () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:640)