Jump to content

falcoiii

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by falcoiii

  1. Trewor007 Thanks for the response, here is the relevant source code. I think it may be the previous script that messes up KOS. At ikemission on 1, line 1 copy dlaunch from 0. ^ Called from d on 1, line 19 run ikemission. ^ d.txt: // more code here... copy dunamission from 0. run dunamission. delete dunamission. print "duna mission done". wait 10. //fails in this mission. copy ikemission from 0. run ikemission. delete ikemission. //more code here... ikemission.txt: copy dlaunch from 0. print "starting dlaunch". wait 2. run dlaunch. wait 2. //fails here... this never prints. print "done dlaunch". wait 2. delete dlaunch. delete warpfast. copy incline from 0. run incline("Ike"). delete incline. delete circularize. copy ike from 0. run ike. delete ike. copy land from 0. run land. delete land. wait 5. dlaunch.txt: if altitude > 50000 { print "Already in space!". } else { unlock steering. lock throttle to 1. print "DunaLaunch!". wait 4. when ship:liquidfuel < 1430 then { stage. }. set mySteer to up. lock steering to mySteer. set diff to 100. lock throttle to 0.5. until ( diff < 1 OR VERTICALSPEED < 1 ) { SET Y to ABS(facing:yaw - mySteer:yaw). SET P to ABS(facing:pitch - mySteer:pitch). SET Y to 180 - ABS(Y - 180) . SET P to 180 - ABS(P - 180) . set diff to Y + P. wait 0.1. }. lock throttle to 1. set mySteer to up. legs off. toggle AG1. wait 9. print "Turning to fix latitude. Waiting for 5000 feet to begin gravity turn.". print latitude. //lock steering to up + R(10*abs(latitude)/latitude,0,0). wait latitude/10 + 10. lock steering to up. print latitude. until altitude >4000 and ALT:RADAR > 1000 { print latitude. }. lock steering to up + R(0,-40,0). //lock steering to heading (90 + latitude/2) by 50. print "Beginning gravity and inclination turn.". print "Waiting for 10000 feet to deepen gravity turn." + latitude. wait until altitude > 10000. //lock steering to up + R(0,0,180) + R(0,-65,0). lock steering to up + R(0,-65,0). print "Deeper gravity turn." + latitude. print "Waiting for apo > 100000.". wait until apoapsis > 100000. lock throttle to 0. lock steering to prograde. print "Waiting for circularization burn." + latitude. wait until altitude > 45000. set warp to 2. wait until altitude > 60500. set warp to 3. wait until eta:apoapsis < 40. set warp to 0. wait until eta:apoapsis < 10. lock throttle to 1. print "Burn.". wait until periapsis + apoapsis > 199000. lock steering to prograde. lock throttle to 0. wait 0.1. print "Burn done.". }.
  2. I am having a problem with a main script calling another launch script. I have other scripts calling each other, but these two always have the same problem. Last line in the launch script is a print "in orbit". and the next line in the main script is a print "finished launching". ... In orbit Argument is out of range parameter name: index At firstmission on 1, line 1 copy dlaunch from 0. ^ Called from mainmission on 1, line 19 run firstmission. ^ ... any idea how I can debug this?
  3. KSP .25 - windows 32 bit. KOS .142. Running one main script that runs different mission scripts that run other small scripts. After a bunch of scripts are called to land on duna and relaunch to orbit, this error shows up. It appears after a small launch subscript is finished (dlaunch) and the mission script (ikemission) should go on to the next command (a print statement for debug purposes). Here are a screenshot of the KOS window and a snippet from the KSP.log file showing a stack trace. Any help would be appreciated. http://imgur.com/kmm9nzs (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) Packing 2b for orbit (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) Reference Frame: Inertial (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) Unpacking 2b (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightControlManager: ToggleFlyByWire: throttle True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightCtrlParam: Enabled: throttle True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightControlManager: ToggleFlyByWire: steering True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightCtrlParam: Enabled: steering True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightControlManager: ToggleFlyByWire: throttle True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightCtrlParam: Enabled: throttle True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) At ikemission on 1, line 1 copy dlaunch from 0. ^ Called from d on 1, line 19 run ikemission. ^ (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) System.ArgumentOutOfRangeException: Argument is out of range. Parameter name: index at System.Collections.Generic.List`1[system.Object].get_Item (Int32 index) [0x00000] in <filename unknown>:0 at kOS.Execution.Stack.Pop () [0x00000] in <filename unknown>:0 at kOS.Execution.CPU.PopStack () [0x00000] in <filename unknown>:0 at kOS.Execution.CPU.PopValue () [0x00000] in <filename unknown>:0 at kOS.Function.FunctionCopy.Execute (kOS.SharedObjects shared) [0x00000] in <filename unknown>:0 at kOS.Execution.CPU.CallBuiltinFunction (System.String functionName) [0x00000] in <filename unknown>:0 at kOS.Compilation.OpcodeCall.Execute (kOS.Execution.CPU cpu) [0x00000] in <filename unknown>:0 at kOS.Execution.CPU.ExecuteInstruction (kOS.Execution.ProgramContext context) [0x00000] in <filename unknown>:0 at kOS.Execution.CPU.ContinueExecution () [0x00000] in <filename unknown>:0 at kOS.Execution.CPU.Update (Double deltaTime) [0x00000] in <filename unknown>:0 (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) Code Fragment File Line:Col IP opcode operand ---- ----:--- ---- --------------------- 1/ikemission 25:1 6555 return 1/ikemission 5:1 6556 push $program-dlaunch* 1/ikemission 5:1 6557 push 0 1/ikemission 5:1 6558 store 1/ikemission 14:1 6559 push $program-incline* 1/ikemission 14:1 6560 push 0 1/ikemission 14:1 6561 store 1/ikemission 21:1 6562 push $program-ike* 1/ikemission 21:1 6563 push 0 1/ikemission 21:1 6564 store 1/ikemission 25:1 6565 push $program-land* 1/ikemission 25:1 6566 push 0 1/ikemission 25:1 6567 store 1/ikemission 1:6 6568 push dlaunch 1/ikemission 1:6 6569 push from 1/ikemission 1:19 6570 push 0 1/ikemission 1:19 6571 call copy() <<--INSTRUCTION POINTER-- 1/ikemission 3:7 6572 push starting dlaunch 1/ikemission 3:7 6573 call print() 1/ikemission 4:6 6574 push 2 1/ikemission 4:6 6575 wait 1/ikemission 5:1 6576 call 6516 1/ikemission 6:6 6577 push 2 1/ikemission 6:6 6578 wait 1/ikemission 7:7 6579 push done dlaunch 1/ikemission 7:7 6580 call print() 1/ikemission 8:6 6581 push 2 1/ikemission 8:6 6582 wait 1/ikemission 9:8 6583 push dlaunch 1/ikemission 9:8 6584 push null 1/ikemission 9:8 6585 call delete() 1/ikemission 10:8 6586 push warpfast 1/ikemission 10:8 6587 push null (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) Stack dump: 001 SubroutineContext: {CameFromInstPtr 99} 000 SubroutineContext: {CameFromInstPtr 40} (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: Popping context 2 (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightControlManager: ToggleFlyByWire: throttle False (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightCtrlParam: Enabled: throttle True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightControlManager: ToggleFlyByWire: steering False (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: FlightCtrlParam: Enabled: steering True (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: Removed Context File Line:Col IP opcode operand (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: Deleting 0 pointers and restoring 0 pointers (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) kOS: New current context File Line:Col IP opcode operand (Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49) SCREENSHOT!!
×
×
  • Create New...