4 posts
Posted 25 September 2012 - 01:42 AM
How to I run a program like "reboot" inside a program that i have made?
1111 posts
Location
Portland OR
Posted 25 September 2012 - 01:45 AM
shell.run("program")
To reboot though you can just call
os.reboot()
4 posts
Posted 25 September 2012 - 01:47 AM
Thanks! I am kind of new to computercraft, but it really peaks my interest :P/>/>
252 posts
Posted 25 September 2012 - 02:05 PM
Either that or use a function… (Put functions above the code, to be safe, because they didn't work for me when I put them below the code)
function reboot()
print("Rebooting")
os.sleep(1)
os.reboot()
end
-- Put your program stuff below this line
-- Then somewhere inside your code put this where you want to reboot
reboot()
That might not help much with rebooting, but it should help with learning functions, good luck!