playMaker

Author Topic: ArgumentException: At least one object must implement IComparable. [SOLVED]  (Read 2309 times)

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Any ideas what does this mean? It appears as an error for array maker proxy and it does not cause any trouble, but it's annoying and i want to know what's going on.

Code: [Select]
ArgumentException: At least one object must implement IComparable.
System.Collections.Comparer.Compare (System.Object a, System.Object b) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.SwapIfGreaterWithItems (System.Int32 a, System.Int32 b) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.PickPivotAndPartition (System.Int32 lo, System.Int32 hi) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.IntroSort (System.Int32 lo, System.Int32 hi, System.Int32 depthLimit) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.IntrospectiveSort (System.Int32 left, System.Int32 length) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
Rethrow as InvalidOperationException: Failed to compare two elements in the array.
System.Array+SorterObjectArray.IntrospectiveSort (System.Int32 left, System.Int32 length) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.Sort (System.Int32 left, System.Int32 length) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array.SortImpl (System.Array keys, System.Array items, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array.Sort (System.Array keys, System.Array items, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array.Sort (System.Array array, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Collections.ArrayList.Sort (System.Int32 index, System.Int32 count, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Collections.ArrayList.Sort () (at <ac823e2bb42b41bda67924a45a0173c3>:0)
HutongGames.PlayMaker.Actions.ArrayListDeleteDuplicates.ArrayDelete () (at Assets/PlayMaker Custom Actions/ArrayMaker/ArrayListDeleteDuplicates.cs:248)
HutongGames.PlayMaker.Actions.ArrayListDeleteDuplicates.doesArrayListContainsCount () (at Assets/PlayMaker Custom Actions/ArrayMaker/ArrayListDeleteDuplicates.cs:102)
HutongGames.PlayMaker.Actions.ArrayListDeleteDuplicates.OnEnter () (at Assets/PlayMaker Custom Actions/ArrayMaker/ArrayListDeleteDuplicates.cs:67)
HutongGames.PlayMaker.FsmState.ActivateActions (System.Int32 startIndex) (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.CheckAllActionsFinished () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:572)
HutongGames.PlayMaker.FsmState.OnUpdate () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:268)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2808)
HutongGames.PlayMaker.Fsm.Update () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2009)
PlayMakerFSM.Update () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:579)
« Last Edit: January 24, 2019, 05:06:54 AM by krmko »
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArgumentException: At least one object must implement IComparable.
« Reply #1 on: January 22, 2019, 03:27:45 AM »
Hi,

 What is the content of the array you are trying work with?

Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: ArgumentException: At least one object must implement IComparable.
« Reply #2 on: January 24, 2019, 05:06:32 AM »
Hi Jean,

sorry, i missed the reply.

Game Objects. Ah, now i see i can't sort arrays holding game objects :/
Available for Playmaker work