Code:
[Tick] Exception during execution:Buddy.Coroutines.CoroutineUnhandledException: Exception was thrown by coroutine ---> System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at HREngine.Bots.MiniSimulator.startEnemyTurnSimThread(List`1 source, Int32 startIndex, Int32 endIndex) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\MiniSimulator.cs:line 226
at HREngine.Bots.MiniSimulator.<>c__DisplayClass2.<doallmoves>b__0(Tuple`2 range) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\MiniSimulator.cs:line 134
at System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](Partitioner`1 source, Action`1 body)
at HREngine.Bots.MiniSimulator.doallmoves(Playfield playf, Boolean isLethalCheck) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\MiniSimulator.cs:line 131
at HREngine.Bots.Ai.doallmoves(Boolean test, Boolean isLethalCheck) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\Ai.cs:line 116
at HREngine.Bots.Ai.dosomethingclever(Behavior bbase) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\Ai.cs:line 252
at HREngine.Bots.Silverfish.updateEverything(Behavior botbase) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\silverfish_HB.cs:line 198
at HREngine.Bots.DefaultRoutine.<OurTurnLogic>d__1c.MoveNext() in d:\stig ssd\z hearthB\Routines\DefaultRoutine\DefaultRoutine.cs:line 764
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at HREngine.Bots.DefaultRoutine.<Logic>d__3.MoveNext() in d:\stig ssd\z hearthB\Routines\DefaultRoutine\DefaultRoutine.cs:line 475
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.t$lOF;G)\,Y`(NX3s:\&%LT>P$(.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.|<kOV#4h/W%u-UR/N"\,\\?P:\*".MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.R8KwNN/q<1Gn-4SeUYi10YDk$.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.jI1e@"^1>|\&\]kfTC\,O2Xj4'G\,.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Buddy.Coroutines.Coroutine.'^Zm4o\]oKn'E<{cTN5x`e8@\&.a4=4qHb$\*Sk7@?S-#K5i@$`g#.MoveNext()
--- End of inner exception stack trace ---
at Buddy.Coroutines.Coroutine.*******(Boolean )
at Buddy.Coroutines.Coroutine.********(Boolean )
at Buddy.Coroutines.Coroutine.Resume()
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.Tick()
at Triton.Bot.BotManager.********(IBot )
that error first match.
Code:
[Tick] Exception during execution:Buddy.Coroutines.CoroutineUnhandledException: Exception was thrown by coroutine ---> System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at HREngine.Bots.MiniSimulator.doDirtyTwoTurnsimThread(List`1 source, Int32 startIndex, Int32 endIndex) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\MiniSimulator.cs:line 302
at HREngine.Bots.MiniSimulator.<doDirtyTwoTurnsim>b__4(Tuple`2 range) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\MiniSimulator.cs:line 286
at System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](Partitioner`1 source, Action`1 body)
at HREngine.Bots.MiniSimulator.doDirtyTwoTurnsim() in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\MiniSimulator.cs:line 283
at HREngine.Bots.MiniSimulator.doallmoves(Playfield playf, Boolean isLethalCheck) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\MiniSimulator.cs:line 187
at HREngine.Bots.Ai.doallmoves(Boolean test, Boolean isLethalCheck) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\Ai.cs:line 116
at HREngine.Bots.Ai.dosomethingclever(Behavior bbase) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\Silverfish\ai\Ai.cs:line 252
at HREngine.Bots.Silverfish.updateEverything(Behavior botbase) in d:\stig ssd\z hearthB\Routines\DefaultRoutine\silverfish_HB.cs:line 198
at HREngine.Bots.DefaultRoutine.<OurTurnLogic>d__1c.MoveNext() in d:\stig ssd\z hearthB\Routines\DefaultRoutine\DefaultRoutine.cs:line 764
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at HREngine.Bots.DefaultRoutine.<Logic>d__3.MoveNext() in d:\stig ssd\z hearthB\Routines\DefaultRoutine\DefaultRoutine.cs:line 475
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.t$lOF;G)\,Y`(NX3s:\&%LT>P$(.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.|<kOV#4h/W%u-UR/N"\,\\?P:\*".MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.R8KwNN/q<1Gn-4SeUYi10YDk$.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.jI1e@"^1>|\&\]kfTC\,O2Xj4'G\,.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Buddy.Coroutines.Coroutine.'^Zm4o\]oKn'E<{cTN5x`e8@\&.a4=4qHb$\*Sk7@?S-#K5i@$`g#.MoveNext()
--- End of inner exception stack trace ---
at Buddy.Coroutines.Coroutine.*******(Boolean )
at Buddy.Coroutines.Coroutine.********(Boolean )
at Buddy.Coroutines.Coroutine.Resume()
at Triton.Bot.Logic.Bots.DefaultBot.DefaultBot.Tick()
at Triton.Bot.BotManager.********(IBot )
Default files except two lines in defaultRoutine.cs
int enfacehp = 30
int twotsamount = 1000
Last edited: