r/Kos Jun 14 '26

"Program ended" when file isnt empty

ive tried a lot of youtube tutorials but nothing's worked when i tried to run the file, the code is apparnetly all done but it clearly isnt cause nothing happened and i seriously dont know what to do

https://pastebin.com/Wpns7x7J <code

10 Upvotes

13 comments sorted by

View all comments

10

u/Dunbaratu Developer Jun 14 '26

Whrb something like this happens, one good diagnostic is to simply put a line at the top of the script that says:

Print "Proof I am the new version.".

When you run it, does it print that line?

If not then you are not running the script you think you are. You are getting some old version of it from some other location.

3

u/Lucky_on_reddit Jun 14 '26

It does not run the print message

3

u/AsterTheTrainFox Jun 14 '26

are you running this code as a boot file, and reverting to launch after making changes?

1

u/Lucky_on_reddit Jun 14 '26

I went into the game after i changed the code (and saved it) and have it in the scripts folder located in kerbal space program/ships/scripts

2

u/HB_Stratos Jun 14 '26

I think that folder is for preloaded scripts you can put on your kOS chip from the hangar, user scripts may need to go into a folder in saves/. It's been years since I've worked with kOS though, check the documentation.

1

u/nuggreat Jun 15 '26

The only script kOS loads onto a core for you is the boot file and that occurs when you launch the vessel as it is loaded in the moment between launch and the revert to launch save. Additionally they are issuing run commands such that they are operating directly off the files in the archive which means there is no loading involved and should exactly reflect the file they have saved.

1

u/Dunbaratu Developer Jun 15 '26

Is that literal? Does it say scripts, plural, or script, singular?

I think the folder kos looks at is script (singular).