ComputerCraft - Programs stop once I log off, have to restart...

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Projekt

New Member
Jul 29, 2019
94
0
0
How do I keep them running regardless of me logging off and on again. It doesn't have to be running when I'm off, I just want it to start running again once I log back on without having to manually select the program again. Is there any additional code I'll have to input?

Thanks in advance.
 

Omegatron

Well-Known Member
Mar 29, 2013
544
371
78
England
Thanks for that, I was using the helloworld program. This will help, thanks!

#EDIT: Wait, hold on... How do I create a program?
Type "edit [programname]", in this case it would be "edit startup".

One thing though, this will restart the program from the beginning, not where it left off. This might or might not work depending on the program you are using. If you are on a server you could place a chunkloader where your computer/turtle works to keep it running while you are offline.
 

Projekt

New Member
Jul 29, 2019
94
0
0
Type "edit [programname]", in this case it would be "edit startup".

One thing though, this will restart the program from the beginning, not where it left off. This might or might not work depending on the program you are using. If you are on a server you could place a chunkloader where your computer/turtle works to keep it running while you are offline.
Alright, I've created a program. ratchet's idea has gotten me stuck. I have a working program to mine the block in front of it if detected. But I do not know where to insert the code he has supplied me with. I did it at the very top, but when I log off and come back on, it has stopped. Let alone if he has even supplied me with the correct code.
 
Last edited:

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
Type "edit [programname]", in this case it would be "edit startup".

One thing though, this will restart the program from the beginning, not where it left off. This might or might not work depending on the program you are using. If you are on a server you could place a chunkloader where your computer/turtle works to keep it running while you are offline.
that chunkloader depends on the settings, some chunkloaders disable when you log off

create an entirely new program with just that line

when a computer boots it tries to run startup if it detects it, shell.run will run the specified program
 

Projekt

New Member
Jul 29, 2019
94
0
0
that chunkloader depends on the settings, some chunkloaders disable when you log off

create an entirely new program with just that line

when a computer boots it tries to run startup if it detects it, shell.run will run the specified program
Oh sweet, thanks! It works :)
 

namiasdf

New Member
Jul 29, 2019
2,183
0
0
Yeah, you need a "startup" program. Every computer on the server will attempt to load a "startup" program. It'd be best if you kept a dedicated drive/disk for every computer and just load off the disk as well. CC is horrendously cheap, for how much it can do.
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
You could also switch to OpenComputers, a big feature of which is that they resume programs when they reload.