r/ComputerCraft • u/Icewing_Nix • Sep 29 '21
I need help stopping a program.
Hello, I found this really cool Matrix Rain code for computercraft, pastebin here : https://pastebin.com/bXvr0vuN
When I make the program a startup the startup never ends, was wondering if someone could make it stop after a certain amount of seconds. Thanks!
5
Upvotes
2
u/cogspace Sep 29 '21 edited Sep 29 '21
The code has a main loop. You should either count how many times it has gone through that loop and then stop the program after that counter gets to a certain number, or get the current time when the program starts, add however long you want the program to run to that number, then exit the loop when you reach the desired time.
Implementation is left as an exercise to the reader. tweaked.cc has a full function reference. =)