bwza767 发表于 2022-9-26 10:58:03

怪物设置行为就会报错

错误信息:索引超出范围。必须为非负值并小于集合大小。
参数名: index

   在 System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   在 System.Collections.Generic.List`1.get_Item(Int32 index)
   在 IFAction.Root.RF.FindValue(Int32 id)
   在 IFAction.Setting.SWEnemyAction.WToolsBase_Loaded(Object sender, RoutedEventArgs e)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   在 System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   在 MS.Internal.LoadedOrUnloadedOperation.DoWork()
   在 System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   在 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   在 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object rKT66iavTEivxLdKzeT1Hqi5c38JT6hYgk)
   在 System.Windows.Media.MediaContext.RenderMessageHandler(Object rKT66iavTEivxLdKzeT1Hqi5c38JT6hYgk)
   在 System.Windows.Interop.HwndTarget.OnResize()
   在 System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   在 System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

1084736768 发表于 2022-9-27 15:02:24

你是把变量删除完了吧?至少要留1个变量

bwza767 发表于 2022-9-27 15:13:21

1084736768 发表于 2022-9-27 15:02
你是把变量删除完了吧?至少要留1个变量

{:3_41:}试了一下添加变量,真的不会报错了,感谢
页: [1]
查看完整版本: 怪物设置行为就会报错