Jump to content

LuccasSantos

Members
  • Posts

    1
  • Joined

  • Last visited

Reputation

0 Neutral
  1. (C#) Hello, I'm having a hard time with exceptions thrown when I try to Undock() a docking port, I searched for scripts on the internet which should probably solve my problem, but I couldn't find any useful examples. Maybe I'm making a silly mistake but I can't figure it out what exactly is. =( I'm looping foreach docking port attached to my Vessel, and if it is docked to something, I want to Undock() it, but I keep getting an error message. Can you guys help me? foreach (DockingPort dockPort in vessel.Get().Parts.DockingPorts) { if (...)... spaceCenter.ActiveVessel = dockPort.Undock(); } Thanks for your attention. The exceptions are as follows: KRPC.Client.RPCException HResult=0x80131500 Message=Field '.BaseEvent.guiName' not found. Server stack trace: at System.Linq.Enumerable.First[BaseEvent] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.FirstOrDefault[BaseEvent] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 at KRPC.SpaceCenter.Services.Parts.DockingPort.InvokeEvent (.PartModule module, System.String eventName) [0x00000] in <filename unknown>:0 at KRPC.SpaceCenter.Services.Parts.DockingPort.Undock () [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 Source=KRPC.Client StackTrace: at KRPC.Client.Connection.Invoke(ProcedureCall call) at KRPC.Client.Connection.Invoke(String service, String procedure, IList`1 arguments) at KRPC.Client.Services.SpaceCenter.DockingPort.Undock() at Kerb_Konnect_Project.KerbKonnect.Main() in G:\Projects\Kerb Konnect Project\Kerb Konnect Project\KerbKonnect.cs:line 58
×
×
  • Create New...